My iOS application's size is quite bigger on app store. How can I lower achieve the app thinning so that application size get lower.
Note
:-
- I am already using Images.xcassets to put x/2x/3x images separately.
- I also read this apple documentation and take care of optimisation level build settings.
- I am also using an 8-bit PNG instead of a 32-bit PNG.
As far as i understand App thinning, it is all done by Apple. It looks at what is the target device, and the required images and stuff will be provided to the user automatically.
If you would like get thinner app, maybe refactoring is the topic you should look at.
App slicing is currently not working until further notice. The only way to reduce your app size is currently to reduce the amount of assets included in the .ipa.
You could try using On Demand Resources if they make sense for your app.
Searching app thining, bit code and on demand app resource from yesterday, Now I debug all these things and sharing my knowledge that I got from beautiful apple documentation with help of my sample project.
App thinning concept covers bit code and on-demand resource. I will discuss on-demand resource in detail below:-
On-Demand Resources in iOS:- It is accessing the images/videos/.h/.m/swift file whenever needed (
Yes, on-demand resouring include source code files also
).Resource tags
setting in your target.Tag
. It will appear under Download Only On demand.Now comes the coding part (my favourite site):-
End accessing the on demand resource when not in use(generally when game level changes)
NOTE:-
Don't forgot to enable On_Demand_Resources in build setting.Please don't bother about autolayout in this project. My main focus is on demand resourcing/App thing.
SUMMARY:- Thus we can achieve
app thinning
byon-demand resourcing
using above technique. Please also have a look at official documentation which also describes abouttracking progress
,priorities
of resourceRequests(NSBundleResourceRequest
).