Is there a standard way to deal with large assets (>100 MB)?

Happy new year everyone!

I have an ionic-3 app for iOS and Android that requires large assets, in total about 300 MB of mostly images. The app needs to work without cellular or wifi connection, which is why I can’t download the assets on demand.

Unfortunately, Google limits the size of the APK file to 100 MB. Is there a standard way to deal with this situation?

I’ve found the https://github.com/agamemnus/cordova-plugin-xapkreader. Unfortunately, this would only work for Android. Before inventing some kind of iOS/Android switch, I was wondering if somebody knew a better way. Thanks!

I would suggest making this content a post-install requirement. I.e. have it auto download once launched for the first time

1 Like

Thank you, Judgewest2000, for your suggestion.

For others facing the same problem: I will try this using ionic’s live-update mechanism.

  • The assets will be compiled in different compression rates: A low preset is about 90 MB, and a high preset is my original 300 MB.
  • The high preset is used in the iOS app that will be deployed to the Apple-App-Store.
  • The low preset is used in the android app that will be deployed to the Google-Play-Store, meeting Google’s 100-MB limit.
  • The high preset will be pushed to ionic: git push ionic master. This way, after downloading the app from the Google-Play-Store (100 MB), the ionic-live-update mechanism will fetch the larger assets (300 MB) from ionic.

Is this content static like images, videos etc?

I.e not code

Yes, it is static content.

By the way: Does the ionic live update try to update over a cellular connection or only when in wifi?

You can try with ionic live but if it’s static I would still recommend making it a post-install operation using a regular web server.

Then you can have a proper loading screen etc. Ionic pro isn’t really supposed to be used for content like that, neither is git.