Xcode 8.3为Unity IOS Build制作了特别大的(.ipa)文件? [英] Xcode 8.3 makes exceptionally large (.ipa) file for Unity IOS Build?

查看:168
本文介绍了Xcode 8.3为Unity IOS Build制作了特别大的(.ipa)文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已成功在Android中推出Unity游戏,最终制作了大小为28mb的最终.apk文件。
当我们将产品的构建导出到Xcode 8.3并开始制作存档以便上传到iTunes Store时,它惊人地回复了一个非常大的最终(.ipa)文件,即160mb。



我们在删除不需要的资产后做了另外的尝试,并制作了另一个具有微小效果并将大小减小到159.4mb的.ipa文件。



我们也是IOS和WatchKit应用程序的开发人员,我们知道Xcode不是一个理想的工具,并且有像封装原始大小的错误,但我们之前从未遇到过这样的问题,因为我们的应用程序已压缩尺寸从来没有这么高。我们的产品压缩尺寸的平均尺寸始终保持在30-40mb,即使是其中最大的。



这款游戏是一款2D游戏,没有这么高分辨率的媒体,真的可以负责这样的大小。
这里我们有关于IOS统一构建的报告:





其次,我们有这个用Xcode制作的.ipa文件的报告。





最后还有导出Xcode的.ipa文件的报告。

解决方案

这有三个原因:



1。)
Xcode 8.3.0 有一个创建更大版本的错误。在我们的例子中它比平常大15%。
这已由Apple在Xcode 8.3.1及更高版本中修复,Apple现在拒绝上传使用Xcode 8.3.0创建的版本。



2。)
App Store Builds的大小比用户在其设备上下载的大,因为它包含每个架构(armv7,armv7s,64bit)或目标设备的所有 bitcode变种。 / p>

此外,下载的压缩文件大小应用安装大小之间存在差异。您可以在应用程序>活动选项卡下的iTunes Connect中上传后检查,然后全部构建。



在我们的案例中,AppStore IPA为181MB大。压缩文件大小为69MB,安装大小为87MB。压缩文件大小和安装大小之间的比率可能会有所不同,具体取决于压缩对资产的处理效果。我还有一个压缩文件大小为618MB,安装大小为1.37 GB的情况。



3。)
Android不会解压缩其APK 安装时直接从中读取/流式传输数据而不在文件系统上完全提取数据。 (另请参阅我的答案)类似问题)


We have successfully launched our Unity Game in Android, where it is finally making final .apk file of size 28mb. When we exported our product's build to Xcode 8.3 and started making archive for uploading to iTunes Store, it surprisingly responded with a final (.ipa) file of very huge size, that is 160mb.

We tried alternatively after removing the unwanted assets and the made another .ipa file which had a minute effect and reduced the size to 159.4mb.

We are also developers of IOS and WatchKit apps, we know that Xcode is not an ideal tool, and has bugs like encapsulating the original size, but we never experienced such an issue before, as our apps compressed size never went this much high. Average size for our products compressed size has always remained 30-40mb, even the biggest of them.

This game is a 2D game with no such high resolution media, that really could be responsible for such hillarious size. Here we have the report for unity build for IOS:

Secondly, we have this report for the .ipa file made in Xcode.

And finally also the plist with the report of exporting Xcode's .ipa file.

解决方案

There are 3 reasons for this:

1.) Xcode 8.3.0 has a bug that creates larger builds. In our case it was 15% bigger then usual. This has been fixed by Apple in Xcode 8.3.1 and later and Apple now rejects uploading builds created with Xcode 8.3.0.

2.) The size of App Store Builds is bigger than then what the user will download on it device, since it contains all the bitcode variants for each architecture (armv7, armv7s, 64bit) or target device.

Additionally there is a difference between the downloaded compressed file size and the app installation size. Which you can examine after the upload in iTunes Connect under the app > "Activity" Tab and then "All Builds".

In our case the AppStore IPA was 181MB big. The compressed file size 69MB and the installation size 87MB. This ratio between compressed file size and install size, might vary depending how good the compression works on your assets. I had also an case of compressed file size 618MB and installation size of 1.37 GB.

3.) Android does not unzip its APK on installation but read/streams data directly from it without extracting it fully on the filesystem. (see also my answer here on a similar issue)

这篇关于Xcode 8.3为Unity IOS Build制作了特别大的(.ipa)文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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