Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 12 Problems: "Build input file cannot be found "- Building for release on a react native app

When I try to do an archive build for "any iOS device", I receive this error:

Build input file cannot be found: '/Users/.../Library/Developer/Xcode/DerivedData/[app]-czrkuohjfzuzxxfobfoyptxhyoyo/Build/Intermediates.noindex/ArchiveIntermediates/[app]/InstallationBuildProductsLocation/Applications/[Product Name].app/[Product Name]'

I received this same error when building for an iOS simulator, but this post fixed it - Problems after upgrading to Xcode 12:ld: building for iOS Simulator, but linking in dylib built for iOS, architecture arm64.

I am also receiving a warning concerning the architectures that may or may not be relatable to the error:

None of the architectures in ARCHS (arm64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, armv7s, armv7) which is not in EXCLUDED_ARCHS (arm64).

architectures

VALID_ARCHS

like image 282
Craig1123 Avatar asked Sep 29 '20 15:09

Craig1123


2 Answers

Build for "Any iOS Device" (for example, "Archive" because you want to upload to AppStore):

  • Delete arm64 from "Excluded Architectures"
  • Delete x86_64 from VALID_ARCHS
  • Add arm64 to VALID_ARCHS

All this changes on both "Build Settings", project and target. And if you want to build for simulator do the inverse path:

  • Add arm64 to "Excluded Architectures"
  • Delete arm64 from VALID_ARCHS
  • Add x86_64 to VALID_ARCHS

That works for me.

like image 85
deimian86 Avatar answered Oct 22 '22 01:10

deimian86


So I had the exact same issue. After updating to Xcode 12 I had originally set both my project and target 's 'Excluded Architecture' to arm64 in order to run on Simulator. But, as you mention, that blocks anything from working on Release / Real device. All I had to do was switch to 'Any iOS Simulator SDK = arm64' instead of all of them, see screen shot below:

link to screenshot

like image 9
LuigiFungShuizi Avatar answered Oct 22 '22 03:10

LuigiFungShuizi