Quick summary for the list:
Use `otool -l | grep __LLVM` to search for the “__LLVM” segment (there’s a “bitcode” section that will also exist, but it’s not a sufficient condition to check for the presence of embedded bitcode).
This works. Unfortunately what I found is that the original static libraries built by Xcode contain bitcode, but when I use `lipo` to combine the device and simulator libraries into one, the resulting library is missing the bitcode.
Basically my build script just does
lipo -create -output fatLibrary.a Release-iphoneos/library.a Release-iphonesimulator/library.a
This is necessary to create a library that can be used to build an app for both simulator and device. (If we distribute two library files, it requires a bunch of ugly customization of the developer’s project’s build settings. This is a very longstanding flaw in Xcode that I and others have complained about several times.)
Unfortunately the lipo tool has very few options, so there doesn’t seem to be a way to turn off whatever behavior is causing the __LLVM segment to be lost in the copying process.
—Jens