Executable size now above 60MB after IL2CPP

The size of the executable file included in my IPA file has increased to beyond Apple’s 60MB limit after building with IL2CPP and for 32-bit and 64-bit architectures.

Does anyone have any advice on how to reduce the size of this file?

Apple’s limit is 100MB.

I got my information from this document, page 78. I hope I’m incorrect, but the document seems up-to-date and was quoted by a user in another post.

Ah yes, sorry, I thought you were talking about the over-the-air download limit. Which is a common question worded in many different ways by people who are new to iOS development. This is something different.

The page you linked to does not open for me at the moment. I don’t know if something is down, but I can find other sources that mention 60 MB for the executable.

I’ve just looked at the game I am working on. I haven’t tried IL2CPP yet, but I am already getting 21.6 MB for an app where I have been very careful about file sizes. Maybe it is getting doubled to include 32-bit and 64-bit, and a bit extra for new Unity features, so I could see it being a problem. I don’t know what other effects IL2CPP has.

I think you will need to bug report this within the Unity Editor as that is the correct channel, and makes sure Unity knows about it.

In my case, the file increased in size when I turned on IL2CPP and then more than doubled again when I changed to Universal architecture (ARMv7 and ARM64). I think this could affect a lot of large projects which are planning to support 64-bit iOS.

I’ve submitted it as a bug to Unity.

1 Like

They know about it. It’s being worked on. My project size–an RPG game --is 4.7 gigabytes so you can imagine what my file size is going to be including both builds–I think we are going to build only for the latest devices–don’t see how we can avoid this. In other words, we’ll have to scrap the support for older devices and only build for 64 bit devices. I asked the question in the Apple Developer forum --can I build and submit only for 64 bit devices—and got a response that was ok. Haven’t tried it yet so don’t know for sure. Trying every means meanwhile to cut my file size down.

The most active thread right now for questions like these and responses from the Unity engineers is here–

http://forum.unity3d.com/threads/4-6-ios-64-bit-beta.290551/page-13

The 60MB limit is for the binary itself - the executable file. It says so right there in the document :wink:

Some clarification:

  • The IPA is the package containing the app. It’s compressed, and a size limit for it doesn’t make sense.
  • The app is the bundle containing the binary, the game data and the metadata to get it running. The total size must be less than 4 billion bytes.
  • The binary is the .app/ file, and this is the one with the small size limit. This file is generally only a few megabytes, although with the current state of IL2CPP who knows what it’ll be :stuck_out_tongue:

Binary != app != IPA, to sum up Apple’s terminology.

1 Like

The real problem is for those of us making fairly sizable RPG games. My Wizzard Island game released last year with Unity was over 100 mb. My current game built with Unity 4.6.2 not even using IL2CPP–just mono-- is already 300+ mb. And that’s after I rebuilt many of the terrains and levels to cut them down. It crashes on older devices, like my iPad Mini.

I haven’t been able to get my game built to run on an older, non 64 bit device using IL2CPP. I pointed this out in the relevant forum threads as have others and they’re working on it. They know the increase that 64 bit support brings is a problem.

We’re thinking of ditching 32 bit support but that cuts out a lot of our players.

Yes, I just wanted to clarify what the 60MB limit was, since I see it thrown around all the time as if it actually mattered more than the 100MB phone network limit :wink:

That would limit you to iPhone 5s and iPad Air or later devices. If we go by UT’s own stats, the target market is then 30.4% of all devices with Unity games. This might be a larger percentage than actual marketshare for 64-bit devices, or it might be representative of the user base as a whole. If the former, the number isn’t that much higher, so I think you limit yourselves a lot. I’d say losing 10-20% of the total market is fine, but 70% seems painful.

Which leaves developers with nagging UT to fix the damn build sizes already :wink:

If Apple won’t accept a game over the 60MB executable limit, but will an app with more than 100MB, then it is right to think it matters more.

It looks like they DO accept larger binaries, though! I found one 32-bit only game, Hearthstone, which has an 89MB executable. I dunno when the iTC document mentioning 60MB was updated, but this game was updated about two weeks ago. The stripped version is 37MB, though, so I’m not sure how they count if they do at all.

I know it would limit us to the more recent devices like the iPad Air2 etc. but we might have to go that route rather than have an app that doesn’t run at all on a 32 bit device.

It appears that targeting 64 bit only devices may be the best way to go anyway. I read here in some thread that Apple is now featuring only apps that support Metal.

Metal will only run on a 64 bit device. Now I don’t know if it’s possible to include Metal support and build a game for 32 bit and 64 bit devices but I don’t think so. I think once you choose Metal support, you go 64 bit.

Like once you go Mac you never go back.

It looks like once you go Metal for 64 bit you have to settle. : {

I honestly don’t know the benefits of Metal as I’ve been battling getting my app to run on both 32 and 64 bit so maybe it’s a good thing and everybody will be taking their 32 bit devices to their local recycling center and upgrading. : )

http://stackoverflow.com/questions/24138046/will-metal-work-on-non-a7-devices-for-example-iphone-5-or-ipad-mini-not-retin

Metal is just a platform-specific API that might make things faster, so it’s possibly great for advanced 3D. It reminds me of the days of 3dfx :slight_smile:

Them featuring Metal only is probably short-term. They’ll go back to featuring things with a theme as usual soon enough. If you can get the game out now, it’ll help. But by the time the next devices are out it could be too late. But by then there might be more 64-bit devices too :wink:

It speeds up GPU calls on the CPU. If your app is GPU-bound then Metal won’t help since it can’t make the GPU run faster.

–Eric

From what I’ve read there is no downside to Metal. :slight_smile: And someone in some thread here says it can run with mono as the backend so going to try it. :slight_smile:

I don’t know what it means to have an app GPU bound. Would like to know. :slight_smile:

It means that the CPU is waiting for the GPU to do its work.

–Eric

1 Like

Thanks. : )