Error: "File was built for archive which is not the architecture being linked (armv7s)" Error: "File was built for archive which is not the architecture being linked (armv7s)" xcode xcode

Error: "File was built for archive which is not the architecture being linked (armv7s)"


I ran into a similar problem myself. @graver's solution is definitely valid.

The issue was that the library was being built for armv7 instead of armv7s. You can verify this yourself by using lipo <path/to/lib.a> -info.

Setting the Build Active Architectures Only option to No fixes the issue.

Hope this helps.


When you're building a library you must compile it both for the simulator and the device and then merge the two outputs (.a files) into 1 library and then link it to your iOS project.


one additional notes is:

    Build Active Architectures Only  set to no

is for the lib project.