Use Asset Catalogs (iOS)

Asset catalogs help organize resources in your app and provide access to them at runtime. They also optimize storage of data in your app including images, colors, fonts, and JSON to provide the smallest possible app size.

Image scales

If you're not using asset catalogs, you may have loose images in your app such as:

[email protected]
[email protected]
[email protected]

With this structure duplicate images are included for all users, everyone gets the images for every screen density. You can optimize this by placing images in asset catalogs so app thinning only delivers the required images. Emerge calculates the size of extra image scales in your app to demonstrate the savings you can get from moving images to asset catalogs.

Loose files

Asset catalogs help manage all kinds of data in your app, even JSON files commonly used for configuration or Lottie animations. If you keep these files loose there are hidden costs associated with them. Since compiled asset catalogs are a single .car file in the file system, resources in asset catalogs will not incur this overhead. You can use NSDataAssets to load any resource from an asset catalog instead of the file system.