Impossible to meet instant app size limit with com.unity.purchasing 4.9.4

Last year I built the instant version for one of my games with the In App Purchasing package version 4.4.1.
Target API level was 33 and target architecture was only ARMv7 which also runs on ARM64 devices.
I was able to meet the current instant app size limit of 20971520 byte which is enforced when pushing the build to production in Google Play Console. My instant app .aab file was 20.5 MB.

Now I want to update the app to Target API level 34 therefore I have to update the In App Purchasing package to version 4.9.4 which now uses Google Play Billing Library v5.2.1 for the Google Play Store:

The problem is this com.unity.purchasing 4.9.4 adds more data.
Now my instant app is over the instant app limit. Its now 22.1 MB which is 1.2 MB too much:


Here are all things I tried to reduce the build size:

  • Build App Bundle: yes
  • IL2CPP Code Generation: Faster (smaller) builds
  • Compression Method: LZ4HC
  • Graphics APIs: only Vulkan
  • C++ Compiler Configuration: Master
  • Target Architectures: only ARMv7
  • Strip Engine Code: yes
  • Managed Stripping Level: High
  • Audio clips: Vorbis, Quality 1, Sample Rate 22.050 Hz
  • Textures are very small and Low Quality Compression
  • Models: Mesh Compression High, Optimize Mesh Everything

Here is the build report:

In Unity IAP 4.10.0 the Legacy Analytics built-in module is no longer a dependency.
This has reduced the build size and I was able to meet the instant app size limit.
Unity IAP package 4.12.2 is now available page-3#post-9407372

That’s great. I didn’t pay attention to the changelog and come here to look for a way to reduce the size.
Ahh, thanks a lot for mentioning the changes, pal.

1 Like