1: Case: Compile the real machine run can, packaging times wrong
Error content
Ld:bitcode bundle could not being generated because '/users/liuyuning/desktop/testdecode/decode/libdecode.a (DECODE.O) ' was built without full bitcode. All object files and libraries for Bitcode must is generated from Xcode Archive or Install build for architecture arm64
Clang:error:linker command failed with exit code 1 (use-v to see invocation)
2:bitcode is the new feature Apple has introduced in Xcode7 and beyond. For the two compilation of code, optimized for CPU, the compilation work is done by Apple AppStore backstage.
Available for iOS is optional and is turned on by default. WatchOS and TvOS are mandatory options. The Apple documentation is as follows
At this point, you need to add an option "-fembed-bitcode" to the Static library project. After that, you can archive normally.
Add "-fembed-bitcode"
Also, if the Static library project has-werror options, it needs to be removed. There should be a warning at compile time. Clang: Warning: argument unused during compilation: '-fembed-bitcode-marker '
If you do not remove it will be an error.
3: If method two is invalid, if
Then the third SDK you choose must also support bitcode for Yes
Archive Packaging Error Apple MACH-O Linker (ID) error