How to check if a static library is built for 64-bit? How to check if a static library is built for 64-bit? ios ios

How to check if a static library is built for 64-bit?


Yes, an arm64 slice is there. To see it, you need to use lipo from the iOS toolchain, not from the host system (which doesn’t know about arm64):

xcrun -sdk iphoneos lipo -info $(FILENAME)


good old file can do the trick, too:

$ file libTestFlight.alibTestFlight.a: Mach-O universal binary with 5 architectureslibTestFlight.a (for architecture armv7):   current ar archive random librarylibTestFlight.a (for architecture armv7s):  current ar archive random librarylibTestFlight.a (for architecture i386):    current ar archive random librarylibTestFlight.a (for architecture x86_64):  current ar archive random librarylibTestFlight.a (for architecture cputype (16777228) cpusubtype (0)):   current ar archive random library

It seems that nobody at Apple cared to add the arm64 cputype to file, yet.

Interestingly, in the iOS 7 Tech Talk Videos ("Architecting Modern Apps, Part 2", PDF page 35) they show a working file tool's output:

enter image description here


For a .framework

lipo -info myFramework.framework/MyFramework