Apploading icons bundled?

My understanding is that we can use Expo’s AppLoading component while an app loads the assets from a CDN. But the AppLoading component itself can have an icon loading image and background image. Are these assets bundled with an app? Is it that all items in /assets are bundled with the app?

If this is the case, then does that mean it’s actually possible to bundle assets with Expo by stuffing them all in the /assets folder?

Hey @robotron I’m glad you asked this question, I have some more details here:

It’s not currently possible to bundle assets inside of standalone apps. For many apps, this is a dealbreaker. For example, if your app includes 100mb of images and you need them to be available immediately when the user opens the app, you will need to detach/eject. When you publish your app, all assets that you import with require in your app are uploaded to CloudFront and loaded on demand, when requested in your app — similar to how a webpage works. This has the benefit of allowing you to update any asset over the air, without re-submitting to app stores, but it isn’t ideal for every situation. Some assets need to be available immediately when the app loads, and sometimes there are a lot of these assets. In these situations, the only option available to you right now is downloading and caching assets when your app loads. We are working on making it possible to bundle assets with your standalone app while also preserving the ability to update them OTA.

You can learn more here:

To answer your question directly, it is not possible to bundle assets with Expo by stuffing them all in the /assets folder, but we are looking at solving this for the future.

Let us know if you have any other questions!

Thanks Jimmy. I think my fundamental question is whether the icons used by the App Loading screen are bundled with the app, or if even those icons are loaded from CloudFront on demand? If the /assets icons are loaded on demand as well, then it’s possible that even the App Loading screen can be missing images on startup?

I was secretly hoping that if the App Loading component’s icons are bundled, then I can somehow shove even more data in there. But this is moot if even those icons are loaded on demand.

You can rely on the assets in app.json to be bundled with the App if they have a specific use case.

We’re going to think of a solution for this in the future, its really great that you brought this up!

1 Like