BabylonNative file size on iOS

Hi, im exploring BabylonNative and wanted to check if there is an file size report on iOS, as in the size in MBs of the components that go into a BabylonNative app. for my use case, it needs to be well under 10MB so that it can launch as an Apple App Clip. im looking for a better alternative to Unity which is usually 30-50 MB with bare bones ARFoundation project. so curious how big bgfx, glslang and other dependencies are when compiled into the app. has this been documented anywhere?

also, after a cursory look, the Apps/Playground/Scripts are quite large and included in the app which will add to the app file size. can they be loaded in from a server url or do they need to be downloaded into the app first before and then loaded into app?

also also, what else can be striped out to reduce file size?

thanks!

Hence the size limit we ended up by playing a prerendered animation of the app in the App Clip instead of running the app itself in the clip.

hi @roland, wow sounds like you’ve successfully integrated BabylonNative with app clips?
is there anywhere I can try out your implementation? thanks!

Hi, ive now got BabylonNative running in my existing XCode project and have uploaded it to AppStoreConnect to see what the file size difference will be with it included.
(i find this to be the most accurate method for investigating app file sizes)

I can report a 4.3 MB increase which is tiny! take that Unity :slight_smile:
and it means BabylonNative is good for use in App Clips.

note: this is excluding the .js scripts included in the project which total 47.8 MB (zipped up 8.3 MB)
my plan is to download these at runtime once the App Clip launches, probably as a zip and unzip it to the documents folder. still need to figure out if Babylon::ScriptLoader can load files outside of the app bundle… if anyone has any ideas, please post.

Nope:

If you don’t use physics, you can remove ammo.js. No GUI, remove gui.js. No navigation, remove recast.js.
Then you can setup your JS project with a template like GitHub - RaananW/babylonjs-webpack-es6: Babylon.js basic scene with typescript, webpack, es6 modules, editorconfig, eslint, hot loading and more. Will even make coffee if you ask nicely.

A production build of a gltf viewer should be less than 1Mb, unzipped.

1 Like