The mobile device market is flooded with multiple iOS devices and their variants with a range of screen sizes and resolutions. Thus making an app work across multiple screens with its aesthetic intact requires optimization (of pngs, jpegs and vectors). This however leads to a massive download for users (previous iOS versions forced users to download the entire app package including images meant for other devices). Considering that a large number of phones have limited 16 GB or 32 GB space, this is criminal wastage of resources. However, iPhone apps with new technologies and recent OS versions have an excellent solution. With the help of a technique called app thinning, apps can be slimmed down and optimized for download.

App thinning automatically detects the user’s device type (i.e. model name) and downloads just the relevant content for a certain device. For example, if you’re using an iPad Mini 1 (which does not have a retina display but rather a 1x resolution), then only your 1x files will be downloaded. This leads to faster downloads and a minimal space footprint, resulting in a better UX.

App Thinning is implemented in three ways:

1. App Slicing
2. Bitcode
3. On-Demand Resources.

App Slicing
Slicing is the process of making different variations of app bundle for various user devices (based on screen resolution, architecture etc). Each bundle comprises only the executable architecture and resources that are required for the targeted device. App slicing handles the largest chunk of the thinning process.

When you’re close to tender the app to the App Store, you need to upload the .IPA or .App file to iTunes Connect just as usual. But you must use Xcode 7 as it contains the iOS9 SDK that supports app thinning. The App Store now slices the app, creating device variants that are distributed to each device.

Bitcode optimizes the apps by making them as fast and efficient as possible on any device. It automatically compiles the app binary for the recent most compiler without the need to submit newer versions of your app to the store. In essence it makes downloads smaller by getting rid of optimizations for different architectures and only downloads relevant optimization.
Bitcode is one of the newer feature of iOS, and it needs to be turned on for new projects. You can do this by using the project settings under Building Settings and then selecting Bitcode to YES.

On-Demand Resources
Resources like images and sounds that you can tag with keywords and request in groups by tag, are called on-demand resources. These are typically files that can be downloaded after the first installation. The store hosts the resources on Apple servers and handles these downloads for you. This enables faster downloads and smaller app sizes, enhancing the user onboarding and first-time launch experience. So for instance, a game app may likely split up resources into game levels and invoke the next level of resources only when the app anticipates that the user will move to that level. Likewise, the app can call for the In-App Purchase resources only when the user makes a corresponding in-app purchase.

Final Thoughts:
App thinning is a powerful capability that has brought lightness and speed to the overall app experience. Fortunately, Xcode and Apple’s App Store take care of the most work so it becomes relatively easy to adopt this technology to your own apps. You can also test your app’s readiness for app thinning using Apple’s TestFlight. Have you implemented app thinning for your app? Do share your feedback in the comments section below.

Author's Bio: 

Kaushal Shah manages digital marketing communications for the enterprise technology services provided by Rishabh Software. This article piece talks about the new app thinning technology in iOS which helps in boosting up the user experience.