Xcode 12 - No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64e armv7s arm64 arm7)

Viewed 27336

Since I update Xcode to Xcode 12, I've got this error when I build :

Check dependencies
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64e armv7s arm64 arm7)

I try a lot of things :

  • Uninstall/reinstall Pods via pod install
  • Build Active Architecture Only to No or to Yes for Debug and Release
  • Same thing for Pods project

Don't know what to do. This error come when I want to launch on iOS 14, but in iOS 13.7 this work perfectly without change.

-- EDIT --

I solve my problem by adding arm64 arm64e armv7 armv7s x86_64 to VALID_ARCHS, both in 'MyProject' and 'MyProjectTest', and it work now.

7 Answers

If you can't see "VALID_ARCHS" in BuildSettings. You can click the plus button.

enter image description here

click "Add User-Defined Setting"

enter image description here

Input setting name "VALID_ARCHS" , input value "arm64 arm64e armv7 armv7s x86_64"

enter image description here enter image description here

Theorectically it should be enough changing debug from yes to no.

enter image description here

But as you said it did not work it must be that you have to set VALID_ARCHS to what you have plus x86_64.

M1 Mac: run Xcode in rosetta(by going to the .app file and clicking "get info" the click "open using rosetta"

Go to your App's target and select 64 bit standard architectures in Architectures section. See attached screenshot

enter image description here

run Xcode in rosetta(by going to the .app file and clicking "get info" the click "run under rosetta"

In Xcode 12, M1 chip macbook I just need to run the app in real device that's it

With Mac M1: Right click into xcode => Get Info => Open using Rosetta enter image description here enter image description here

Related