Enabling Bitcode for iOS 9 increases IPA size 3x, is this the size on the app store?

此生再无相见时 提交于 2019-12-05 03:09:31

Bitcode is an intermediate representation of a compiled program. Enabling it will increase the build (ipa) size on the developer front.

iOS can run on different CPUs (i386, x86_64, arm, arm64, etc.), if you want to run program on any iOS setup, then the program should contain object code for each platform. When you run a program, OS reads the ‘Table Of Contents’ and looks for a slice corresponding to the OS CPU. For instance, if you run operating system on x86_64, then OS will load object code for x86_64 into a memory and run the program.

Currently, all the apps on the AppStore contain object code for arm and arm64 CPUs. Moreover, third-party proprietary libraries or frameworks contain object code for i386, x86_64, arm and arm64, so you can use them to test the app on device and/or simulator.

How the Bitcode works? When you submit an app (including Bitcode) Apple’s ‘BlackBox’ recompiles it for each supported platform and drops any ‘useless’ object code, so AppStore has a copy of the app for each CPU. When end user wants to install the app - she installs only version for particular processor, without any unused stuff.

Bitcode might save up to 50% of disk space per program.

Refere: http://lowlevelbits.org/bitcode-demystified/

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