3

I am trying to build my project to my iphone 5 and I keep getting this warning No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7s, VALID_ARCHS=armv6 armv7) Does anyone know how to fix this?

Stephen
  • 499
  • 9
  • 28

1 Answers1

18

You get this error becuse your active Architecture is armv7s (armv7s is the architecture for iPhone 5's A6 SoC):

active arch=armv7s

but this architecture is not listed among your valid architectures:

VALID_ARCHS=armv6 armv7

Modify the "Valid Architectures" in your project target's "Build Settings" by adding armv7s (you might as well remove armv6 since Xcode 4.5 does not support that any more):

enter image description here

You might also need to change the "Architectures" property:

enter image description here

and set "Build Active Architecture Only" to NO (so your project is built for all listed architectures including armv7, which older devices, e.g. iPhone 4S, can execute):

enter image description here

Also, check out this answer.

Community
  • 1
  • 1
Imre Kelényi
  • 22,113
  • 5
  • 35
  • 45
  • 2
    the only thing I had to change was setting the "Build Active Architecture Only" to NO! Thanks – Stephen Sep 28 '12 at 20:36
  • I guess that by setting it to NO, an armv7 architecture version of your app is built which works on iPhone 5. Glad I could help! – Imre Kelényi Sep 28 '12 at 21:00