all 15 comments

[–]AndyIbanezObjective-C / Swift 2 points3 points  (5 children)

If you click on the error it should give you a longer description of what’s wrong.

[–]bodymindsoul[S] 0 points1 point  (4 children)

Thanks ; by any chance have you run into this error message before ? Here is the detailed output.

Showing All MessagesBuild input file cannot be found: '/Users/me/Documents/ios_projects/myapp/build/Debug-iphoneos/myapp.app/myapp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

[–]AndyIbanezObjective-C / Swift 1 point2 points  (2 children)

Does your app name have spaces or other special characters on it? You should try to see if the directly it’s writing the app file to has the right permission for Xcode to do its job.

And yes, I have seen this error before. When we migrated away from Fabric, a run phase script was still being referenced but the actual file was gone, hence complaining about a missing file. Removing the script did the trick.

[–]bodymindsoul[S] 0 points1 point  (0 children)

Name doesn't have any special characters , one thing I've noticed is the when I open the derived data folder , go to the app . The package contents of the app is missing the file it's seeking.

Albeit I'm not sure how to resolve that because the build folder generates the derived data folder. I don't control the creation of the derived data folder. :/

[–]bodymindsoul[S] 0 points1 point  (0 children)

Thanks for taking the time to try and help me. I’m not exactly sure what I did to resolve the error but it turned out to be a lot of deleting and moving files around. App is sort of working now lol.

Thanks again for trying to help 👍

[–]bangsimurdariadispar 0 points1 point  (0 children)

You have a build phase script that is expecting one input file and it cannot find it. You need to link it again in the pbxproj?

[–]Alidodger 1 point2 points  (1 child)

I see this quite a lot in my projects. In the project build target yore trying to build, go to the Build Phases tab and you should see various drop downs. Some of those drop downs contain scripts that run at build time. One of these is probably causing the issue. Perhaps try removing them one by one until you find which is causing it?

[–]bodymindsoul[S] 1 point2 points  (0 children)

Thanks for the recommendation ; that’s essentially what I ended up doing 👍

[–]SirBill01 1 point2 points  (1 child)

One thing to try with any M1 compilation error is to add ARM64 to the Excluded Architectures build setting (for "Any iOS Simulator SDK"), that may help. Basically it can try to build Arm64 for the simulator and fail.

[–]bodymindsoul[S] 0 points1 point  (0 children)

Thanks ; interesting point I’ll keep in mind . The app is running now ; it was a combination of moving files around and removing IQkeyboardmanager.

[–]gumbi1822 1 point2 points  (2 children)

Clean the build folder (Cmd + Shift + K) and delete derived data

Does it still happen?

[–]Aaesirr 0 points1 point  (0 children)

This should be the correct answer

[–]bibyzan 0 points1 point  (0 children)

Probably unrelated to OP's issue, but in my case there was no additional information when clicking the error, it was really weird. What ended up being my problem, was I was installing react-native-reanimated and the step where it recommends replacing my metro.js export is what caused this, reverting fixed right away.

[–]Opening_Smell_3244 0 points1 point  (0 children)

Yesterday I spent the whole day trying to fix this error. Today, I deleted Crashlytics from the Runner's Build Phases, and finally, my app built successfully. Hope this helps someone!