为什么我的应用在 App Store 上大了 25%?
我上传的 zip 文件大小为 19.5MB,但在 App Store 上,Apple 报告该文件大小为 24.5MB——对于无线下载来说太大了。 Apple 是否添加了 5MB 包装器?解压缩和重新压缩效率较低?使用815K“兆字节”?
The zip file I uploaded is 19.5MB, but on the App Store, Apple reports it as 24.5MB -- too large for over-the-air downloading. Is Apple adding a 5MB wrapper? Decompressing and recompressing less efficiently? Using 815K "megabytes"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自苹果:
源(展开部分查看构建的文件大小(iOS、tvOS))
From Apple:
Source (Expand section View the file sizes of a build (iOS, tvOS))
使用 iTunes 从 App Store 下载该应用程序。您最终应该在
~/Music/iTunes/Mobile Applications
中得到一个 .ipa,这(希望)与您从 App Store 获得的差不多。检查其尺寸。您还可以使用unzip -Z myapp.zip
之类的工具来检查单个文件的压缩大小(.ipa 只是 .zip)。如果像 FreeAsInBeer 的答案一样,您的可执行文件的压缩大小正在增加负载,那么可能值得尝试解决此问题(5 MB 是很多代码)。使用
-Os
进行编译可能会有所帮助。另请注意,.ipa 将包含一些附加信息,即 iTunesArtwork(来自最大 512x512 App Store 应用程序图标)和 iTunesMetadata.plist(其中包含 App Store 类别等内容)以及一些 FairPlay 信息。我不确定其中哪些会发送到设备。
最后,Apple 可能会使用 M = 106 而不是 220 — 19.5×220 ≈ 20.4×106< /sup> . IIRC 这是 Snow Leopard 的变化之一。
Download the app from the App Store with iTunes. You should end up with a .ipa in
~/Music/iTunes/Mobile Applications
which is (hopefully) approximately what you get from the App Store. Check its size. You can additionally use something likeunzip -Z myapp.zip
to check the compressed size of individual files (an .ipa is just a .zip).If, as in FreeAsInBeer's answer, your executable's compressed size is increasing loads, then it might be worthwhile trying to fix this (5 MB is a lot of code). Compiling with
-Os
might be helpful.Also note that the .ipa will have some additional info, namely iTunesArtwork (from the up-to-512x512 App Store app icon) and iTunesMetadata.plist (which has stuff like the App Store category) and some FairPlay information. I'm not sure which of these are sent to the device.
And finally, Apple might be using M = 106 instead of 220 — 19.5×220 ≈ 20.4×106 . IIRC this was one of the changes in Snow Leopard.