Bitcode is an Apple technology that basically allows Apple to recompile apps submitted to the App Store at will for optimization reasons.
https://developer.apple.com/documentation/xcode/reducing_your_app_s_size/doing_basic_optimization_to_reduce_your_app_s_size
One of the limitations of this technology is that the app must be 100% buildable from the bitcode embedded into the binary, which I assume is in fact the LLVM IR. This apparently disallows any sort of architecture-specific assembly in the source code.
As a result, when trying to upload an app with bitcode enabled, ITMS returns this error:
ITMS-90562: Invalid Bundle - Bitcode failed to compile for your watchOS binary because it includes assembly source code or inline assembly. To resolve this issue, rewrite the corresponding code in a higher-level language such as Objective-C or Swift and redeliver your app.
While looking for a workaround, I found that Xcode allows one to add LLVM assembly sources to a project. I wasn't able to find a directive equivalent to .incbin in the LLVM assembly manual, though, but maybe I simply missed it.
Anyway, the workaround, of course, is to recode any binaries into C-array literal syntax and compile them as C code.
I suggest that this issue be mentioned in the README. It would also be helpful if the library emits a warning if targeting the iOS platform.
Bitcode is an Apple technology that basically allows Apple to recompile apps submitted to the App Store at will for optimization reasons.
https://developer.apple.com/documentation/xcode/reducing_your_app_s_size/doing_basic_optimization_to_reduce_your_app_s_size
One of the limitations of this technology is that the app must be 100% buildable from the bitcode embedded into the binary, which I assume is in fact the LLVM IR. This apparently disallows any sort of architecture-specific assembly in the source code.
As a result, when trying to upload an app with bitcode enabled, ITMS returns this error:
While looking for a workaround, I found that Xcode allows one to add LLVM assembly sources to a project. I wasn't able to find a directive equivalent to
.incbinin the LLVM assembly manual, though, but maybe I simply missed it.Anyway, the workaround, of course, is to recode any binaries into C-array literal syntax and compile them as C code.
I suggest that this issue be mentioned in the README. It would also be helpful if the library emits a warning if targeting the iOS platform.