Follow

Optimizing iOS & tvOS apps with app thinning and IL2CPP

Symptoms

  • App size is bigger than the over-the-air download limit and forces iOS users to download the app via WiFi.
  • I want to use resource slicing and bitcode on iOS and tvOS.
  • I use AssetBundles, but I would like to support on-demand resources on iOS and tvOS.
  • The universal binary of the app or single slices are bigger than allowed from the Apple submission guidelines.

Cause

My app is bigger than the over-the-air download limit on iOS and bigger than the main application bundle size on tvOS. 

I want to get the best download size, storage utilisation and runtime performance for my iOS and tvOS app.

The otool report shows that single binary slices (32bit, 64bit) or the universal binary are bigger than the allowed limits from the Apple submission guidelines.

Resolution

App slicing is very useful on iOS and tvOS platforms, as it helps the developers to pack more assets into the initial app bundle and still stay within the over-the-air download limit on iOS and main application bundle size on tvOS. There are two flavors of app slicing: app executable slicing and app resource slicing.

You can use on-demand resources to both reduce initial application download sizes and reduce the device storage usage by removing no longer needed assets.

IL2CPP converts ahead-of-time (AOT) C# code into C++ code which will be compiled into the final binary of your app using XCode and LLVM. This can lead to bigger universal binaries or app slices (32bit,64bit). You code can be optimised.

More Information

This article applies to Unity versions 5.2.0p1 and higher, XCode 7 and higher, iOS 9.0 and higher

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.