Now besides icons and splash screen, our app also might include other assets.
This app actually doesn't
but you might have other images here in the asset folder which you're using in your app with image component,
so not network images but local images
as we also use them earlier in the course or you might be using custom fonts as I did in many of the course
modules.
Now if you do that, there is actually something interesting happening in a managed expo app.
When you publish your app and even if you later deploy it to the app stores which I will show you, these
assets by default are actually taken by expo, are optimized and so on and are then uploaded onto one of
their servers for free but they're uploaded there and your app is configured to download them from the
servers when it launches.
Now the advantage of this is that your app bundle is kept a bit smaller because the files are not included
in your app but instead live on a server and are downloaded into the running app
but the disadvantage of this approach can be that your app always needs an Internet connection because
if you don't have an internet connection, your images and your fonts can't be loaded into the app and
that of course might lead to your app not working in the way it should.
So therefore, you actually might not want to have your images or fonts uploaded to expo's servers or
at least not all of them
and that's what you can control with that asset bundle patterns
setting in the app.json file. Whichever path or paths you provide here will be excluded from uploading
and you can use wild cards.
Now as you see, what this basically says is all files should not be uploaded, so all files should be included
into the app bundle.
If this would be an empty array or if this would not be set at all, this option, then you would have the
default behavior of uploading all assets to the servers.
With this approach which was preconfigured here, you say upload everything to expo's servers except
for what you find in this path and this path on the other hand is a wild card that says everything,
so every file in every folder of this project should be part of the app bundle, so actually nothing
will be uploaded with this setting.
You could also be saying everything in assets or maybe everything in assets and subfolders of
assets should be part of the asset bundle,
if you had any other files which you use the app in other folders, you would upload them. So you can really
control this in great detail
and again you can learn more in the official docs if you wish to, attached you find a link to that as well
and therefore you can control what's part of your bundle,
therefore increasing the size of it a little bit and the loading time of the app a little bit or what
should be stored on servers, which might make your bundle a bit smaller but which forces you to always
have an internet connection.