20

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

Craig1123
  • 1,510
  • 2
  • 17
  • 25

5 Answers5

34

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.

deimian86
  • 1,127
  • 1
  • 11
  • 26
  • 1
    It worked! Thank you so much. Under "Excluded Architectures", I added under release "Any iOS SDK" and removed arm64. Did the same for VALID_ARCHS. I'm a little annoyed still lol.... must be from the battle scars of xcode 12. – Craig1123 Sep 30 '20 at 17:48
  • @deimain86 why the is so ....and what particular changes do I need to do when making build...i.e deploying to the appstore – Ashish Gupta Feb 18 '21 at 13:47
  • @AshishGupta Delete arm64 from "Excluded Architectures" Delete x86_64 from VALID_ARCHS Add arm64 to VALID_ARCHS – Atmaram Oct 07 '21 at 12:26
  • @deimain86 thanks ...but its already 8 months since i asked the question :) – Ashish Gupta Oct 08 '21 at 11:55
  • I do not have Xcode 12 but I am facing the same issue. I have Xcode 11.7 but I got this project from someone who must be having Xcode 12. Is there any solution for me to make it run? – salvi shahzad Oct 16 '21 at 15:28
  • Where does one find VALID_ARCHS in Xcode 13? – craigpatik Jul 01 '22 at 15:56
  • @craigpatik see this [answer](https://stackoverflow.com/a/64051811/17927980) – Amin Rezaew Jul 02 '22 at 18:50
9

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

2

I know this question has been answered but this piece of information may help someone: This kind of error may also be produced if you have no node_modules folder e.g. you have deleted it and forgot to re-create it

Martin Lockett
  • 2,275
  • 27
  • 31
2

This error started happening for me with a SwiftUI app. I didn't need the file for my project, but the settings were set to generate a file anyways. What worked for me was to go into Project Navigator --> App Target --> Build Settings --> Packaging and delete the value (file name) for the Info.plist File key.

Dharman
  • 30,962
  • 25
  • 85
  • 135
James D
  • 41
  • 1
  • 5
0

This problem wasted a lot of my time after upgrading to xcode 12, using React Native 0.63. Excluding architectures did not work for me.

Symptoms: "build input file could not be found..." when running on device in debug AND release. Simulator worked fine.

To Fix: Editor > Validate Settings... > Perform Changes

Now my app builds fine on device.

David Biggs
  • 589
  • 4
  • 4