查询官方文档解释如下
Bitcodeis an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binaryin the future without the need to submit a new version of your app to the App Store.
For iOS apps, bitcode is the default, but optional. For watchOS and tvOS apps, bitcode is required. If you provide bitcode, all apps and frameworks in the app bundle (all targets in the project) need to include bitcode.
Xcode hides your app’s symbols by default, so they are not readable by Apple. When you upload your app to iTunes Connect, you have the option of including symbols. Including symbols allows Apple to provide crash reports for your appwhen you distribute your app using TestFlightor distribute your app through the App Store. If you’d like to collect and symbolicationcrash reports yourself, you don’t have to upload symbols. Instead, you can download the bitcode compilation dSYM filesafter you distribute your app.
位码是编译程序的中间表示形式。你上传到iTunes Connect中的包含位码的应用程序将在App Store上编译和链接。包括位码将允许苹果在未来重新优化你的应用程序二进制不需要提交一个新的版本的应用程序到应用程序商店。
对于iOS应用程序,bitcode是默认设置,但可选。对于watchOS和tvOS应用程序,需要位码。如果您提供位码,应用程序包中的所有应用程序和框架(项目中的所有目标)都需要包含位码。
Xcode会默认隐藏应用程序的符号,因此苹果无法读取这些符号。当你将应用程序上传到iTunes Connect时,你可以选择包含符号。当你使用TestFlight发布你的应用程序或通过app Store发布你的应用程序时,包含符号可以让苹果为你的应用程序提供崩溃报告。如果你想自己收集和符号崩溃报告,你不需要上传符号。相反,您可以在发布应用程序后下载位码编译dSYM文件。
还有一段如下的描述:
Bitcode. When you archive for submission tothe App Store, Xcode will compile your app into an intermediate representation.The App Store will then compile the bitcode down into the 64 or 32 bitexecutables as necessary.
当提交程序到App store上时,Xcode会将程序编译为一个中间表现形式(bitcode)。然后App store会再将这个bitcode编译为可执行的64位或32位程序。
但是bitcode并不能还原第一事故现场,所以我们一般选择关闭它
如果我们的工程需要支持bitcode,则必要要求所有引入的第三方库都支持bitcode
网友评论