What is exact connection between BITCODE_ENABLE and dylib framework?

跟風遠走 提交于 2019-12-23 09:40:21

问题


I have seen many reference Link for find out connection between the BITCODE_ENABLE and .dylib framework, But i can not get positive result. Please anyone help me what is the exact connection between both and also mention use of BITCODE_ENABLE Clearly.


回答1:


I think you're confusing what Bitcode actually is. Bitcode can be used with both static frameworks and dynamic libraries.

From the Apple docs:

Bitcode is 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 binary in the future without the need to submit a new version of your app to the store.

Most libraries and frameworks are "fat," meaning they contain extra binaries to support all architectures. This means that an iOS framework might support armv7, armv7s, and i386 (all device architectures and the simulator).

Building a library with bitcode allows it to support App Thinning. Meaning only the binaries appropriate for the architecture the app will run on are downloaded from the App Store. Additionally as Crazyrems mentions in the comments, this will optimize the app installation and download size, as the device will only download the assets necessary for the application to run on that specific architecture/device.

I won't go into details about LLVM IR, but I would recommend reading these articles for reference:

  • Bitcode Demystified

  • Why I’m not enabling Bitcode - Thoughts on application binaries packaging and software distribution

  • Static Libraries, Frameworks, and Bitcode



来源:https://stackoverflow.com/questions/37937218/what-is-exact-connection-between-bitcode-enable-and-dylib-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!