【问题记录】【Unity打包iOS】bitcode bundle could not be generated because xxx was built without full bitcode

报错:
打包Archive的时候报错:
ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/xxx/xxx/xxx/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
ld: bitcode bundle could not be generated because '/Users/xxx/xxx/xxx/Frameworks/xxx/Plugins/iOS/xxxSDK.framework/xxxSDK' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build file '/Users/xxx/xxx/xxx/Frameworks/xxx/Plugins/iOS/xxxSDK.framework/xxxSDK' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

原因:
导入的第三方库不包含bitcode。
Bitcode是苹果在Xcode7及以后推出的新功能。用于代码的二次编译,针对CPU进行优化,编译工作由苹果AppStore后台来完成。
是bitcode是被编译程序的一种中间形式的代码。包含bitcode配置的程序将会在App store上被编译和链接。bitcode允许苹果在后期重新优化程序的二进制文件,而不需要重新提交一个新的版本到App store上。

解决:
1,让第三方库支持bitcode,(大多数情况下不太有效···)
2,关闭bitcode,"Build Setting" => "Build Options" => "Enable Bitcode" => "No"。可以在PROJECT中直接关闭,也可以在TARGETS中分别关闭。

【问题记录】【Unity打包iOS】bitcode bundle could not be generated because xxx was built without full bitcode_第1张图片

你可能感兴趣的:(问题记录)