I'm facing the same issue. Just like you, BITCODE_GENERATION_MODE
and OTHER_CFLAGS="-fembed-bitcode"
are simply ignored, and my builds broke
I did notice that it sometimes work, and sometimes doesn't. It seems that if you build the framework (or aggreate target) for the simulator, the bitcode goes away, no matter what you have in the xcodebuild commands.
I'm using Xcode 7.3, and I have 2 targets : Static Library, and Aggregate target to make the fat framework.
What works for me when it builds a bitcode-less framework, is to:
- Select the static library target (not the aggregate one), and pick "Generic iOS device"
- Clean it
- Select the static library target, but pick a simulator
- Build it (works, even if it's instantaneous because it hasn't been cleaned)
- Select the static library target, but pick "Generic iOS device" again.
- Build it
- Select the aggregate target for a "Generic iOS device"
- Finally, build it
- If this failed, start over. I sometimes need to do it two or three times before it works.
When I do that, my fat library ends up having bitcode.
You can check that your framework has bitcode support easily by running otool -arch armv7 -l <framework_path> | grep LLVM
In order to break it again, simply build the aggregate target for a simulator. The library will still be a fat one, but bitcode's gone.
Somebody surely can find a solution that works everytime, but at least it fixes the issue for me.
I certainly did not have to do that with Xcode 7.2, and I don't know how that works for pure CLI builds.