App thinning in iOS 9: Explained

Over the last year, Apple has introduced new services like iCloud Photo Library and iCloud Music Library that keep recent and frequently accessed data on the device but offload older and infrequently accessed data to Apple's servers. That nearline strategy helps ensure more space is available for updates to begin with. With iOS 9, Apple is taking space-savings to a whole new level with App thinning, which includes asset slicing, on-demand resources, and bitcode.

How asset slicing works

Asset slicing recognizes that apps have been getting bigger over the years. They've added support for all sorts of device traits, including iPhone and iPad idioms, @2x and @3x resources, 32-bit and 64-bit chipsets, OpenGL ES and Metal in high and low quality, 1 GB and 2GB of memory, different audio sampling rates, and more. All of that overhead slows downloads and takes up storage. Since no single device needs all those resources, though, asset slicing aims to pare them back down.

Developers still upload the full universal app to the App Store but then the App Store takes it and delivers only a variant app tailored specifically for the device that's downloading it.

Standard resources are automatically sliced but, for custom data, developers are encouraged to add asset catalogs, including the new named data and sprite atlases options, and declare which data is needed for which device traits. The better organized and catalogued the assets are, the better the slicing will be.

So, if you have an iPhone 5s, for example, and you tap to download an app, the App Store will give you the iPhone 5s variant. That means you won't get the interface elements for an iPad, the @3x graphics resources for the iPhone 6 Plus, the 32-bit code for iPhone 5 or earlier, or the shader code for an iPhone 4s or iPad 2 graphics processor. You'll only get what your iPhone 5s needs, and you'll get it in a smaller package that takes less time to download.

Apple claims storage savings in the range of 20-40%, even for social networking and video streaming apps.

How on-demand resources work

On-demand resources (ODR) takes things a step further by only downloading content you might need when you first start using an app. That can included game levels, video tutorials and other media, document templates, instrument packs, and more.

For example, when you download a new game, the App Store could only include the first five levels and keep the rest ready and waiting on Apple's servers. As you complete level three, the App Store could download level six and remove level one. Then download level seven and remove level two, and so on.

In other words, as new content comes in, old content goes out. So, an app or game may vary slightly in size over time as you use it, but you never have to store all of it at once.

Using asset slicing and ODR makes it easier for apps and games to stay beneath the current 100 MB cellular networking download limit. A game that was previously 150 MB for its full universal binary, for example, may be only 90 or 100 MB for any individual device variant and resource payload, and so be able to be downloaded anywhere, at any time.

What's more, very large apps like triple-A games won't have to worry as much about Apple's Wi-Fi download limit of 4 GB either. That's because, even if the complete universal binary package is 4 GB, as long as no individual device slice variant and resource payload exceeds 4 GB, it'll be under the limit.

Depending on the type of app, space savings can exceed 50%, which across all apps on a device can result in a significant return on storage space. It will most benefit legacy 8 GB devices and current 16 GB devices, which compromise storage for entry-level price points.

It's even better on the new Apple TV, where Apple never wants a customer to see an out of storage space error or have to worry about manually managing space.

How bitcode works

Shifting from the present to the future, the App Store will also be delivering apps in bitcode, a forward-looking LLVM intermediary representation of the binary. That will let Apple optimize and re-optimize an app binary for the specific device architecture that's downloading it without requiring the developer to manually update and resubmit the app.

It's not a way to abstract out processor platforms so Apple can switch architectures on the fly at some point. It's a way to make sure customers get the benefits of the latest architectures, instructions, and optimizations as soon as they're available.

Although mandatory for watchOS apps, bitcode is still optional for iOS, though Apple believes it's important enough to opt projects in by default.

Lastly, for developers who no longer want to support older devices, Apple will now let them release apps that are 64-bit only. That way they only have to concern themselves with iPhone 5s, iPad Air, iPad mini 2, iPod touch 6, and later devices.

What you need to do

The nice thing about app thinning is that it's absolutely transparent on the customer's end. As long as developers are building for iOS 9, and making sure they tag their assets and resources as best as they can, the App Store will handle everything. All you need to do is download the updates when they're ready and the newer, thinner apps will be yours.

For 16 GB device owners, every megabyte will matter. But even for 64 GB or 128 GB device owners, being able to fill storage with real, useful apps and content and not a bunch of stuff we don't need is a huge win.

Rene Ritchie
Contributor

Rene Ritchie is one of the most respected Apple analysts in the business, reaching a combined audience of over 40 million readers a month. His YouTube channel, Vector, has over 90 thousand subscribers and 14 million views and his podcasts, including Debug, have been downloaded over 20 million times. He also regularly co-hosts MacBreak Weekly for the TWiT network and co-hosted CES Live! and Talk Mobile. Based in Montreal, Rene is a former director of product marketing, web developer, and graphic designer. He's authored several books and appeared on numerous television and radio segments to discuss Apple and the technology industry. When not working, he likes to cook, grapple, and spend time with his friends and family.