为iOS 9启用Bitcode会增加3倍的IPA大小,这是应用程序商店的大小吗? [英] Enabling Bitcode for iOS 9 increases IPA size 3x, is this the size on the app store?

查看:826
本文介绍了为iOS 9启用Bitcode会增加3倍的IPA大小,这是应用程序商店的大小吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS 9之前,我们的IPA大小约为6MB。在通过Xcode 7归档和导出我们的IPA之后,我们的IPA增加到大约17MB。经过进一步调查,我们发现在导出设置中启用Bitcode选项是导致大文件大小跳跃的原因。

Before iOS 9, our IPA size was roughly 6MB. After Archiving and exporting our IPA through Xcode 7, our IPA increased to about 17MB. Upon further investigation, we found out that enabling the "Bitcode" option in the export settings is what caused the large filesize jump.

我的问题是:如果我们启用此功能选项,我们的IPA规模是否会在商店中达到17MB?或者Apple是否对捆绑做了一些事情,使其大小与以前大致相同(6MB)。

My question is this: if we enable this option, will our IPA size be 17MB in the store? Or does Apple do something with the bundle to make it roughly the same size as before (6MB).

现在没有太多关于Bitcode的信息,而且我'我希望在提交到商店之前得到通知。 6MB和17MB足以引起关注。

There's not much info about Bitcode out there right now, and I'd like to be informed before submitting to the store. 6MB and 17MB is enough of a difference to be concerned.

推荐答案

Bitcode是编译程序的中间表示。启用它将增加开发人员前端的构建(ipa)大小。

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

iOS可以运行在不同的CPU(i386,x86_64,arm,arm64等)上,如果你想在任何iOS设置上运行程序,那么程序应该包含每个平台的目标代码。运行程序时,OS会读取目录并查找与OS CPU对应的片。例如,如果您在x86_64上运行操作系统,则操作系统会将x86_64的目标代码加载到内存中并运行该程序。

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.

目前,AppStore上的所有应用程序包含arm和arm64 CPU的目标代码。此外,第三方专有库或框架包含i386,x86_64,arm和arm64的目标代码,因此您可以使用它们在设备和/或模拟器上测试应用程序。

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.

Bitcode如何运作?
当您提交应用程序(包括Bitcode)时,Apple的'BlackBox'会为每个支持的平台重新编译它并删除任何无用的对象代码,因此AppStore会为每个CPU提供应用程序的副本。当最终用户想要安装应用程序时 - 她只安装特定处理器的版本,没有任何未使用的东西。

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可以为每个程序节省高达50%的磁盘空间。

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

参考: http://lowlevelbits.org/bitcode-demystified/

这篇关于为iOS 9启用Bitcode会增加3倍的IPA大小,这是应用程序商店的大小吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆