How to check if a framework is Bitcode supported for Xcode7

ipraba picture ipraba · Sep 27, 2015 · Viewed 13.3k times · Source

From Xcode 7 it became one of the common problem that third party frameworks should support Bitcode. We can also disable the BITCODE by setting ENABLE_BITCODE to NO in Build settings. But i do not want to turn it off, instead i want to convert all my frameworks to BITCODE compatible.

So how to check if a framework is BITCODE compatible apart from compiling the framework in Xcode. Sometimes Xcode give error for BITCODE compatibility for one framework leaving the others even though they don't have BITCODE support.

Is there any tool/command line check?

Answer

Michael M. Myers picture Michael M. Myers · Sep 30, 2015

From this Apple Developers Forum discussion, user dshirley and bwilson suggest using command line tools otool and grep to check if bitcode sections exist.

$ otool -l libName.o | grep __LLVM

or

$ otool -l MyFramework.framework/Versions/A/MyFramework | grep __LLVM

Running the above command, if the library contains bitcode you will see segname __LLVM output.