UIImage storage

Hi.


I’m stuck with a very specific problem on xcassets.

I actually have my application that must run on every devices that supports iOS 8 and more, both iPad and iPhone.


And it has come with a huge problem. To reduce my app’s size I prefer to use the minimum assets I need, so my iPad 1x assets are iPhone 2x and iPad 2x are iPhone 3x, I’ve edited the json corresponding to every assets to make the paths corresponds.


In fact everything works, and works well. My app is like 19mo on my device with a lot of assets. But there is a problem through, when I archived my app, it was around 96mo, that is pretty embarassing.


I tried to figure out what it could be, and my last try was to uncheck iPad version of some of my biggests assets, the result ? My archive was around 64mo, I figured that xcassets duplicate every assets on the archive, which means that my try to get 1 assets for multiple device is not taken in account.


I’d like to not do all the work by hand (which means have a function that check the device to load the right version of the assets, what xcassets is suppose to do), and I’d like to know if there is anything I can do to prevent the archive to duplicate instead of keeping references on the same assets?


Thanks in advance,

Replies

I do not have personal experience with it, but have you read about App Thinning? https://developer.apple.com/library/watchos/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html

>My app is like 19mo on my device with a lot of assets. But there is a problem through, when I archived my app, it was around 96mo, that is pretty embarassing.


Seen these?


About size increases: