Xcode 6.1 Missing required architecture X86_64 in file
The first thing you should make sure is that your static library has all architectures. When you do a
lipo -info myStaticLibrary.a
on terminal - you should seearmv7 armv7s i386 x86_64 arm64
architectures for your fat binary.To accomplish that, I am assuming that you're making a universal binary - add the following to your architecture settings of static library project -
- So, you can see that I have to manually set the
Standard architectures (including 64-bit) (armv7, armv7s, arm64)
of the static library project.
- Alternatively, since the normal
$ARCHS_STANDARD
now includes 64-bit. You can also do$(ARCHS_STANDARD)
andarmv7s
. Checklipo -info
without it, and you'll figure out the missing architectures. Here's the screenshot for all architectures -
For your reference implementation (project using static library). The default settings should work fine -
Update 12/03/14
Xcode 6 Standard architectures exclude armv7s.
So, armv7s
is not needed? Yes. It seems that the general differences between armv7 and armv7s instruction sets are minor. So if you choose not to include armv7s, the targeted armv7 machine code still runs fine on 32 bit A6 devices, and hardly one will notice performance gap. Source
If there is a smarter way for Xcode 6.1+ (iOS 8.1 and above) - please share.
missing required architecture x86_64
You are trying to build a universal library and it does not have all the architectures in it armv7 armv7s i386 x86_64 arm64
. Compiler is complaining when you build with 64 bit architecture.
To fix this - Add the following to your architecture settings of static library project:
This needs manual addition of architectures something like this:
Build the library with these architecture both on device & simulator, create fat library using lipo -create -output "myLibrary.a" ./Simulator/myLibrary.a ./Device/myLibrary.a
and use it.
Related Topics
Changing Navigation Bar Color in Swift
Invalid Swift Support - Files Don't Match
What Is the '' Is or the ':' at the Equation When Coding in Swift
Renew Push Certificate and Keep Current App Store App Working
Simulate Force Touch/3D Touch on iPhone 6S or iPhone 6S Plus Simulators
Uidatepicker Select Month and Year
Objective C - Assign, Copy, Retain
Customizing the More Menu on a Tab Bar
Dynamically Changing Font Size of Uilabel
Swift Programmatically Navigate to Another View Controller/Scene
iOS 8 Enabled Device Not Receiving Push Notifications After Code Update