Why builds are so different in size?

Same code, build for iOS, different signing credentials:
Ad-hoc build: 25 MB
Release build: 150 MB
Is there a clear explanation of what’s happening? I searched forums but can only find recommendations on how to make builds smaller by manipulating assets. Since ad-hoc build works fine and contains all assets, why can’t release build be same small? Or is it a problem with Cloud Build?

Are you measuring the .ipa file that is exported from Xcode ?

You should note a few things when considering the file size:

  • Some builds contain dSYMs - debug symbols that are uploaded to the App store and are used for symbolication (translating addresses in crash reports from users into human readable format). These symbols are quite large, but are not downloaded to the clients of end-users.
  • Universal builds - when exporting from Unity, the default option (AFAIK) is Universal - it creates a build that is suitable for both ARM64 and older ARM devices (are they still used?). In an case - the final .ipa contains the binaries for both of these, even though the end-user will only download the one relevant for his device type.

What you really care about eventually is the download size. You can get an estimate by uploading a build to the app store, and under the “Activity” tab when selecting that build, it will give you the option to get an estimate download size.

Of course, reducing the size of code/assets in the build means a smaller download size, but it’s really hard to correlate between the .ipa and the final download size (there’s no magic “formula” that i know of).

Hope this helps.

I’m not using Xcode directly, I use Cloud Build. The Universal option could be the reason but I do see that on the iPhone (with Test Flight installation) the app is 102 MB. Still the difference is strangly huge. Ad-hoc build is 25 MB.

you can unzip both builds and look into what’s inside. you can also post your findings here so we can examine them.

Just with usual WinZip or something? On Windows 10 system?

Not sure, i’m on a MAC. i think you can just rename it to .zip and unzip it.

Nothing interesting in it. Lots of png files and other small stuff, but there is also one big file that is not an archive. Huge file. In one build its 35 MB and in another over 100 MB.
Something else going on.
Does anybody noticed the file size change when moving from ad-hoc build to production (release) build?

Disable bitcode, maybe?

Hmm, where to disable bitcode?

Here it is: