iOS App切片或细化无效

时间:2016-04-14 15:48:01

标签: ios objective-c iphone ipa app-thinning

我目前正在尝试优化iOS IPA的大小,并希望新的“iOS App Slicing”能够减少最终输出中包含的图像数量。情况似乎并非如此。

我正在构建iOS 9.3,部署目标(7.0 - 虽然也试过9.3无效)。它是一个通用应用程序,应用程序图标/启动图像位于资产目录中(以及其他一些图像资源)。

为了测试切片,我按照这里的说明操作: https://developer.apple.com/library/tvos/documentation/IDEs/Conceptual/AppDistributionGuide/TestingYouriOSApp/TestingYouriOSApp.html#//apple_ref/doc/uid/TP40012582-CH8-SW17

App Thinning Size Report显示设备类型之间的大小差别很小,iPad和iPhone应该有很大差异!

App Thinning Size Report for All Variants of myApp

Variant: myApp-iPad (4th generation)-etc.ipa
Supported devices: iPad (3rd generation) and iPad (4th generation)
App + On Demand Resources size: 71.8 MB compressed, 90.3 MB uncompressed
App size: 71.8 MB compressed, 90.3 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPad 2-etc.ipa
Supported devices: iPad 2 and iPad mini
App + On Demand Resources size: 71.6 MB compressed, 90.1 MB uncompressed
App size: 71.6 MB compressed, 90.1 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPad Pro (12.9-inch).ipa
Supported devices: iPad Pro (12.9-inch)
App + On Demand Resources size: 71.5 MB compressed, 90.9 MB uncompressed
App size: 71.5 MB compressed, 90.9 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPad Pro (9.7-inch).ipa
Supported devices: iPad Pro (9.7-inch)
App + On Demand Resources size: 71.5 MB compressed, 90.9 MB uncompressed
App size: 71.5 MB compressed, 90.9 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPad mini 3-etc.ipa
Supported devices: iPad Air, iPad mini 2, and iPad mini 3
App + On Demand Resources size: 71.5 MB compressed, 90.9 MB uncompressed
App size: 71.5 MB compressed, 90.9 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPad mini 4-etc.ipa
Supported devices: iPad Air 2 and iPad mini 4
App + On Demand Resources size: 71.5 MB compressed, 90.9 MB uncompressed
App size: 71.5 MB compressed, 90.9 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPhone 4S.ipa
Supported devices: iPhone 4S
App + On Demand Resources size: 71.8 MB compressed, 90.3 MB uncompressed
App size: 71.8 MB compressed, 90.3 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPhone 5-etc.ipa
Supported devices: iPhone 5 and iPhone 5c
App + On Demand Resources size: 71.8 MB compressed, 90.3 MB uncompressed
App size: 71.8 MB compressed, 90.3 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPhone 5s.ipa
Supported devices: iPhone 5s
App + On Demand Resources size: 71.5 MB compressed, 90.9 MB uncompressed
App size: 71.5 MB compressed, 90.9 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPhone 6 Plus.ipa
Supported devices: iPhone 6 Plus
App + On Demand Resources size: 71.9 MB compressed, 91.2 MB uncompressed
App size: 71.9 MB compressed, 91.2 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPhone 6.ipa
Supported devices: iPhone 6
App + On Demand Resources size: 71.5 MB compressed, 90.9 MB uncompressed
App size: 71.5 MB compressed, 90.9 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPhone 6s Plus.ipa
Supported devices: iPhone 6s Plus
App + On Demand Resources size: 71.9 MB compressed, 91.2 MB uncompressed
App size: 71.9 MB compressed, 91.2 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPhone 6s.ipa
Supported devices: iPhone 6s
App + On Demand Resources size: 71.5 MB compressed, 90.9 MB uncompressed
App size: 71.5 MB compressed, 90.9 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPhone SE.ipa
Supported devices: iPhone SE
App + On Demand Resources size: 71.5 MB compressed, 90.9 MB uncompressed
App size: 71.5 MB compressed, 90.9 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPod touch (6th generation).ipa
Supported devices: iPod touch (6th generation)
App + On Demand Resources size: 71.5 MB compressed, 90.9 MB uncompressed
App size: 71.5 MB compressed, 90.9 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp-iPod touch.ipa
Supported devices: iPod touch
App + On Demand Resources size: 71.8 MB compressed, 90.3 MB uncompressed
App size: 71.8 MB compressed, 90.3 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed


Variant: myApp.ipa
Supported devices: Universal
App + On Demand Resources size: 75.3 MB compressed, 99.9 MB uncompressed
App size: 75.3 MB compressed, 99.9 MB uncompressed
On Demand Resources size: Zero KB compressed, Zero KB uncompressed

在对该过程导出的“特定设备变体”的进一步调查中,我发现没有发生明显的切片。

适用于iPhone 5设备变体的App Payload - 解压缩IPA后:

App Payload - After unzipping IPA

如果我对切片的理解是正确的,那么其他iOS设备(例如iPhone 6 +,iPad)不应该有图标或启动图像

以下是我的资产目录(在xcode和finder中)的内容,如果它有帮助:

asset catalog

asset catalog in finder

提前致谢! :)

1 个答案:

答案 0 :(得分:1)

Answering my own question:

My current hypothesis is that Launch Images and Icons are not thinned/sliced. This is because they are often used to detect support for certain devices at launch.

However, I can confirm that other image resources in the Asset Catalog are thinned correctly.

You can check by unzipping the IPA and running the CARExtractor tool on the Assets.car file within the IPA.

https://github.com/Marxon13/iOS-Asset-Extractor/tree/master/CARExtractor