Fix “Build input file cannot be found“ Error in Xcode
See how to fix the “Build input file cannot be found“ error in Xcode. It can be caused by different reasons.
• 1 min read
Error
Build input file cannot be found
Complete error
Build input file cannot be found: 'path/to/file'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?
Problem
This pretty not understandable error can happen for multiple reasons.
May be, there was some merging conflict to apply and it went wrong.
Or in my case, it happened after I added a new target to the project.
Solution
The error was caused by excluding the arm64
architecture for the new target.
In the main target the wasn't any excluded architecture but in the new target Xcode added arm64
automatically to the Excluded Architectures
.
To solve it:
- In the
Navigator sidebar
select your project - Then, select the affected target in the
Project and targets
sidebar - Go to
Build settings
and search forExcluded Architectures
- Double-click on the corresponding row and remove the
arm64
architecture - Clean your project (
cmd + shift + K
) or for a hard clean (cmd + option + shift + K
) - Close Xcode
- Open your project again and build
Hopefully the error is now gone.
If you have any question about this article, feel free to email me or tweet me @franceleonidev and share your opinion.
Thank you for reading and see you in the next article!
Share this article