-
Notifications
You must be signed in to change notification settings - Fork 106
Description
Bitcode is an Apple technology that basically allows Apple to recompile apps submitted to the App Store at will for optimization reasons.
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.