What I got here is this application we built earlier in the course with the native device features, with
the camera, maps and so on.
This is the app I want to deploy
and this is now how we can configure it to be deployed in the managed expo workflow
as I mentioned.
So what can we do?
Now we should have a look at the app.json file because that's the file where we can generally configure
this app for deployment and for publishing it
and I want to walk you through some of the core settings you can make here and you should make here.
Though let me also point you at the official docs, the official expo docs where you also have
a full article about configuring the app.json file, you will find this article attached or a link to
it attached to this lecture and there, you learn all about the possible settings you can set up there
and what they mean, what they do and what you would need them for.
So there's a lot you can configure but for a basic deployment, most of these things don't matter.
So what we have here for example is the name of our project and there, I will use great places,
this is also a name that will show up on the home screen when you build this app as a standalone app
and I'll come back to what a standalone app is in a second.
Now here, we also can add a slug and that should be like this in the URL format so that this could
be part of the URL and you'll see where this becomes important in a second as well.
The same for privacy public,
we can leave this here at public for the moment but again this is something which I'll explain in
more details in a second.
The SDK version here simply identifies the SDK version of the expo SDK you're using, typically this should
be the latest one though of course if you were building the app with let's say expo SDK 33 and
then whilst you're building it, a new version comes out, you should always follow the update or the upgrade
guides which are released along with the new expo version.
New expo versions simply means that some features could change, that maybe some breaking changes were
added, some bug fixes,
so typically you want to upgrade but you want to follow the upgrade instructions, though you don't have
to use the latest version here to be able to deploy it,
you can also deploy an older version here. Platforms, that should be self explanatory,
you can describe for which platforms you want to publish and I'll remove web here because we haven't
really focused on that and support for it also is still kind of experimental,
so let's go with iOS and Android, then you can set a version and this number is totally up to you, in
the end,
you should just manage the version such that whenever you publish a new version of your app, you change
that and you have three numbers which you can change, where typically the last number should be changed
if a new version only includes tiny bug fixes but no major new features. The middle number should be
changed if you have a new version that does introduce major or important new features
and the first number should be changed whenever you have a real major new version
that might also very well include some breaking changes or some huge changes.
So that's kind of something which also signals your users if it's a rather big important update or just
a small one, just a small fix.
Orientation is a setting we already saw earlier in the course,
there you can lock the orientation of your app.
You can set this to default to allow for rotation or for rotating the app,
you can set it to portrait or landscape mode to lock it down. Icon and splash screen,
that's something I'll come back to in separate lectures soon.
This allows you to set an app icon and an app splash screen and you just set a pointer at an input source,
at a basic file and then expo will generate a bunch of icons for different device sizes, different
screen sizes which is really convenient
but again I'll come back to this in more details later. Updates,
that's also something I'll come back to, that's related to the over the air update thing which is
very interesting. Asset bundle patterns,
also something I'll come back to, this kind of has an impact on how extra assets, like images that are
part of your app
and with that I don't mean the icon but images which you display in your app, which you store locally
or fonts which you might be using,
how those are distributed
but again I'll come back to this and then you can also set platform specific settings here for iOS and
Android.
Now if you want to publish your app, you can do this in a very simple way,
you just need to run expo publish.
Now when you first run this, you will be prompted to log in with your expo account or create a new one
if you don't have one yet.
So simply create one, it's free, it doesn't cost you anything, you just need to create one, you can do this
on the fly after running expo publish,
as I said you will be prompted to create an account or log in if you aren't already
and there you can create the account on the go in this command line here.
All you need is an email, a username and a password.
Once you did this and you run expo publish, this will try to publish your app and no worries, it will
not immediately publish it to the app stores. Now
instead let's see what happens if we try to do this,
it now builds a Javascript bundle for Android and also for iOS. It also gave us a warning by the way
regarding our assets not being optimized,
that's something we can have a look at in a second
and with all of that, it's now uploading the Javascript bundles,
we don't know where but we'll see in a second
and now it's done.
So did it now create an app and upload it to the app stores?
No, that's not what happened here.
Instead what it did here is it created a deployment,
it published our app to expo.
So what you can do now is you can enter the URL which was displayed here and
what you find is your app now hosted on expo servers
so to say and you can scan this barcode here with a real device, with the expo client app.
So basically what we already did during development can now be done with our published app,
so let me briefly show this to you.
Here's my iPhone and now again I just point my camera at this QR code or with Android, you open your
expo app and scan the barcode there and now you can open that app in expo.
Now again, you need the expo client installed for this.
Now what you'll also see here on the screen however is a warning that I can't open this app because
I'm not the author of the experience.
So the expo client on iOS site as you see here can no longer open published projects that don't belong
to the signed in user.
Now that's an iOS limitation, on Android
you would be able to open this app but of course the question is in general, why would we publish our
app like this?
It's very hard to reach users with this,
they need to have the expo client app installed which almost no one has in the world,
probably just a couple of React Native developers,
so this is not really how we want to distribute our app, right?
Well this is just one step of distributing our app and this is actually not how we aim to target it
or how we aim to get it to all users over the world,
instead this is just one step of publishing it to the app stores. This still is a nice step for you to
now easily test your app or to share it with other users, especially on Android, on iOS
unfortunately there are some limitations where you can't test this
but with Android devices, you can scan this and you can share an app across users, you can show it to your
friend and all this friend needs is the expo client app and you can scan this code and run the app
you just built on his device.
So for this, it's nice but of course, this is not the final solution for really publishing this to unknown
users.