2

After upgrading the Xcode to 12.2 from 11.x , I'm getting a wierd error when trying to run the app on iOS Simulator.

The error is:

error: Build input file cannot be found: '/Users/mrt/Library/Developer/Xcode/DerivedData/xxx-fqqnstjlfcnipqbcjbnhysubdksn/Build/Products/Debug-iphonesimulator/xxx.app/xxx' (in target 'xxx' from project 'xxx')
  • Here the missing /xxx is the unix executable file inside the .app folder.

When I try to build it on phone, there is no such error.

When I checked the location in finder, the unix executable file inside the .app is missing, for Debug-iphonesimulator, but it is present in Debug-iphoneos

I have no idea, why that executable file is missing.

  • I have added the arm64 in the excluded arch section in the new Xcode. Both in project and target Buil Settings.

enter image description here

  • I tried changing project settings to Legacy Build, and it resulted in same error.
  • I haven't moved any plist files or any files in my project. I deleted some unused targets and related files. The error didnot mention anything about deleted files. Hence I do not think , those could be the reason. I tried this SO link, and it didnt solve my issue. My plist file path is $(SRCROOT)/xxx/SupportingFiles/xxx.plist
  • I did delete derived data and clean, many times. Not solved.
  • I tried adding x86_64 under VALID_ARCHS and adding arm64 under exluded arch settings, as suggested in here. Not solved.

Is there anything that I'm missing ?

Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109

1 Answers1

1

THIS error maybe your update Xcode version like: Xcode 10 to Xcode 12, the your old PROJECTS will got this error, can't running your app again.

Try this:

1: VALID_ARCHS (in the "Architectures" tab) key on the BuildSettings of "PROJECT" GROUP or just search "VALID_ARCHS", maybe in the other Tabs( or in the "User-Defined")

set value "arm64" or others

IMG SIMPLE: enter image description here

2: select TARGETS: your app's target

search for the same KEY ("VALID_ARCHS") and just selection the current row and click "delete" on your keyboard, there will be with default values(it is the same value of PROJECT's Build Settings )

3: clear and rebuild

JNYJ
  • 515
  • 6
  • 14