Search code examples
objective-ciosarchitecturecompiler-errorsios6

Xcode iOS6 compile errors: No architecture


So I just recently updated Xcode to 4.5 and was able to get my hands on a iOS6 phone. I was doing testing on the simulators fine (4.3/5.1/6.0) but when i decided to build on the actual iOS 6 phone 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 lookup and fixed it by going into build settings to change the valid architectures to include armv7s and it did what it was suppose to do.

HOWEVER by 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 looking it feels to me the static library framework is causing all the problems since it doesn't support iOS 6 and I'm not too optimistic that it can be fixed easily. However since I couldn't fine my exact situation on the net I'm hoping there's someone who knows this better than me and can help me. Thanks

Note: that static library is everywhere in the code, removing it is pretty much not an option


Solution

  • Xcode 4.5 doesn't support armv6 anymore, so you need to remove this architecture.

    As you already found out, the library you use doesn't seem to support armv7, which now is essential.

    I think there is no alternative to compiling the library with the correct target. If you have the source code, this should be trivial; if it's third party, you depend on them to update. They will know, however, that without updating their library has reached end of life.