iOS Build is significantly larger than expected

Hello,

I’m building a game/e-book in Unity 5.1.1f1 Personal that is intended for iOS/Android release. In the final steps of trying to build the game for iOS and Android I have found that my build for iOS devices is significantly larger than builds for either standalone or Android.

My project uses a few high-quality textures, and several movies, all of which should come out to around 80 MB. The Android build matches my expectations, but the iOS version stands around 130-140 MB. When I inspect the package, the binary itself is around 67 MB, and there are still several dozen MB worth of data with the videos and textures. This puts the iOS build well over the maximum 100 MB allowable size.

So far my research has shown this may be due to XCode building with both arm64 and armv7 architecture to accommodate both 32- and 64-bit devices, but I have not found a way around this issue.

Here is what my Editor Log shows:

Textures 7.4 mb 41.5%
Meshes 16.2 kb 0.1%
Animations 18.5 kb 0.1%
Sounds 0.0 kb 0.0%
Shaders 403.9 kb 2.2%
Other Assets 4.9 mb 27.7%
Levels 113.8 kb 0.6%
Scripts 1001.3 kb 5.5%
Included DLLs 3.9 mb 22.1%
File headers 52.0 kb 0.3%
Complete size 17.8 mb 100.0%

It shows the Complete Size is 17.8 MB, but this does not include the movies, which are in the StreamingAssets Folder. When I install the build on my iPhone to test, it takes up around 134 MB. Does anyone have any insight as to why the binary file is so large (around 67 MB), or does anyone have suggestions on how I might reduce the data footprint?

Many thanks

iOS apps can be 4GB in size, as of February this year; up from 2GB previously. 100MB is merely the OTA limit. Anyway set ARM64 instead of universal (which doubles binary size) in the architecture player settings in Unity.

–Eric

Thank you for your quick reply!

I was under the impression that apps had to be built with both arm64 and armv7 architecture. Since my target device is 64-bit architecture, it doesn’t make sense to include 32-bit compatibility, which is what confused me in the first place. But from what you indicated, it is possible to release an app with only one kind of architecture. Is that so?

@paraParadise

Yes, it is possible to build the app for a single architecture. You can change the “Architecture” option in the iOS Player Settings to be either “ARM64” (for 64-bit) or “ARMv7” (for 32-bit).