Xcode iOS6 Compilation Errors: No Architecture

So, I recently upgraded Xcode to 4.5 and was able to access my iOS6 phone. I did testing on simulators (4.3 / 5.1 / 6.0), but when I decided to build iOS 6 on the phone itself, it gave me this error.

No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7s, VALID_ARCHS=armv6 armv7 i386). 

I did some searching and fixed it by going to build settings to change the valid architectures to enable armv7, and it did what it was supposed to do.

HOWEVER, adding that I got this error

 ld: file is universal (3 slices) but does not contain a(n) armv7s slice: some static library framework for architecture armv7s 

After some glance, it seems to me that the static infrastructure of the library causes all the problems, because it does not support iOS 6, and I'm not too optimistic that it can be easily fixed. However, since I could not accurately assess my exact situation on the network, I hope that someone knows this better than me and can help me. Thanks

Note: this static library is everywhere in the code; deleting it is largely not an option.

+7
source share
5 answers

Xcode 4.5 no longer supports armv6, so you need to remove this architecture.

As you already learned, the library you are using does not seem to support armv7, which is essential now.

I think there is no alternative to compiling a library for the right purpose. If you have the source code, this should be trivial; if it is a third party, you will depend on them to update. They will know, however, that without updating their libraries, they have reached the end of their lives.

+2
source

You can try to change the "Built-in active active architecture only" YES → NO. Works well for me.

+10
source

To build all the static libraries associated with applications, you must create code for all application architectures.

Xcode 4.5 seems to have updated your project to create armv7s code, but it forgot to add armv7s to active application architectures.

Once you fixed this, it seems like the problem is that the static library is not generating armv7s code, but your application is trying to create for armv7s.

If this is a problem, there are two ways to fix it. Or you want your application to generate only armv7 code (eliminating the need for armv7s code), for which you need to change the settings of the target application to:

enter image description here

... or do you want your application and all associated static libraries to have build settings that look like this:

enter image description here

The armv7 code will run from anything from 3gs up. The armv7s code will only work on the iPhone 5 and will be slightly faster.

So, if you have access to the iPhone 5 for testing, and you have the source code for a static library, then the second option is probably the best. Otherwise, assuming your library at least generates armv7 code, then, while your application is not trying to create armv7, you should be fine too.

If the library only creates armv6 code that is not supported by xCode 4.5, you will need to change its build settings to create at least armv7 code.

+5
source

I have a similar problem. Having received this solution, changing the value "Only embedded active architecture" to "NO" in the build settings of the target project.

enter image description here

+1
source

Remove armv7s and add armv7 (and / or armv6)

0
source

All Articles