Well, you’ve probably figured it out from the title that, this article is about how to reduce app’s footprint and improve user experience while targeting a wide range of iOS and watchOS devices.
In WWDC ‘15 June event Apple released iOS9 and tried to address storage concerns by reducing its own OS size from 4.58 GB(iOS 8 Size) to 1.3 GB(iOS 9 Size) and introduced a brand new feature known as ‘app thinning.’
Each universal iOS app binary you download contains a whole bunch of code for a whole bunch of devices, app that supports from iPhone 4s to 6 plus, iPad 2 to iPad Air 2 contains assets for all these variants.
Apps are getting storage-hungry as and when a new resolution of device gets introduced. Things gets even worse in case of Game application which have multiple levels and it needs to keep all the multimedia (images, videos audio etc.) for all variants of devices. Even when user is in first level it still have to keep assets of 100th level.
Apple! as always tries to solve the problem from the root, came to rescue and introduced App Thinning.
With app thinning, Apple makes it a whole lot easier for developers to split up their apps such that users only download the code and asset that they actually need.
Developers will still upload the entire assets and code to App Store as they do now. App Store and iOS will handle the rest to deliver device-specific variant of those apps.
For inApp-Purchase applications iOS and AppStore will download and keep the required resources ready when user will unlock the paid feature. This feature will be supported from iOS 9 onwards. It will ensure apps use the lowest amount of storage on a device by only downloading the parts it needs to run on individual handsets.
The assets which one app is no longer using will be removed by the OS to keep storage free for other apps to run.
image from Apple
The App Store and operating system optimize the installation of iOS and watchOS apps by tailoring app delivery to the capabilities of the user’s particular device, with minimal footprint. This optimization, called app thinning, lets you create apps that use the most device features, occupy minimum disk space, and accommodate future updates that can be applied by Apple. Faster downloads and more space for other apps and content provides a better user experience.
Apps that take advantage of app thinning will see their download size reduced by around 20 to 40%, it will be a major boon for entry level devices of storage 8gb or 16gb.
But having said the above, beta testing of the application will have more importance in future, especially while supporting offline mode.
There are three components of app thinning: Slicing, Bitcode, and On-Demand resources.
Shortly I will be writing the next section on this topic – How to do ‘App Thinning’ programmatically.