19

Preface: I did look at similar questions and none of the answers seemed to fix my problem.

I am trying to build my xcode (version 5.1.1) project using:

xcodebuild clean build -sdk iphonesimulator7.0 -arch "armv7s" ONLY_ACTIVE_ARCH=NO,

when I run this I get: No architectures to compile for (ARCHS=armv7s, VALID_ARCHS=i386 x86_64) as an error. I tried the above command with all of the VALID_ARCHS (rm64 armv7 armv7s) as inputs. So I then tried running this command:

xcodebuild clean build -sdk iphonesimulator7.0 -arch "i386" ONLY_ACTIVE_ARCH=NO

and I then get No architectures to compile for (ARCHS=i386, VALID_ARCHS=arm64 armv7 armv7s) as an error. I tried running the above command with all the other VALID_ARCHS (i386 x86_64) and no luck with that either. I don't know why these architecture errors are occurring. I have cocoapods in my project, and the first answer in the link above didn't fix my issue.

6

2 Answers 2

20

You can override your default variables: Try to use this:

xcodebuild clean build -sdk iphonesimulator7.0 -arch "i386" ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64"

If you building for Simulator - always build for i386/x86_64.

2
  • How do you fix this inside the Project Settings?
    – Meekohi
    Dec 4, 2015 at 20:27
  • in my case i add this line by reference of above answer -arch i386 ONLY_ACTIVE_ARCH=NO VALID_ARCHS=i386 its work for me .thanks @Sath89 Mar 9, 2016 at 9:31
3

Go to your project settings (not targets). Then open Build Settings and add a value to Valid architectures: i386

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.