1 00:00:02,340 --> 00:00:06,700 What I got here is this application we built earlier in the course with the native device features, with 2 00:00:06,700 --> 00:00:08,640 the camera, maps and so on. 3 00:00:08,650 --> 00:00:10,950 This is the app I want to deploy 4 00:00:11,140 --> 00:00:16,800 and this is now how we can configure it to be deployed in the managed expo workflow 5 00:00:16,810 --> 00:00:18,060 as I mentioned. 6 00:00:18,130 --> 00:00:19,720 So what can we do? 7 00:00:19,810 --> 00:00:24,910 Now we should have a look at the app.json file because that's the file where we can generally configure 8 00:00:25,150 --> 00:00:28,280 this app for deployment and for publishing it 9 00:00:28,420 --> 00:00:34,690 and I want to walk you through some of the core settings you can make here and you should make here. 10 00:00:35,380 --> 00:00:40,030 Though let me also point you at the official docs, the official expo docs where you also have 11 00:00:40,030 --> 00:00:45,550 a full article about configuring the app.json file, you will find this article attached or a link to 12 00:00:45,550 --> 00:00:51,250 it attached to this lecture and there, you learn all about the possible settings you can set up there 13 00:00:51,490 --> 00:00:55,270 and what they mean, what they do and what you would need them for. 14 00:00:55,290 --> 00:01:01,510 So there's a lot you can configure but for a basic deployment, most of these things don't matter. 15 00:01:01,540 --> 00:01:09,060 So what we have here for example is the name of our project and there, I will use great places, 16 00:01:09,130 --> 00:01:14,320 this is also a name that will show up on the home screen when you build this app as a standalone app 17 00:01:14,350 --> 00:01:17,710 and I'll come back to what a standalone app is in a second. 18 00:01:17,710 --> 00:01:24,340 Now here, we also can add a slug and that should be like this in the URL format so that this could 19 00:01:24,340 --> 00:01:30,130 be part of the URL and you'll see where this becomes important in a second as well. 20 00:01:30,130 --> 00:01:31,750 The same for privacy public, 21 00:01:31,750 --> 00:01:37,450 we can leave this here at public for the moment but again this is something which I'll explain in 22 00:01:37,450 --> 00:01:39,780 more details in a second. 23 00:01:39,790 --> 00:01:47,560 The SDK version here simply identifies the SDK version of the expo SDK you're using, typically this should 24 00:01:47,560 --> 00:01:54,940 be the latest one though of course if you were building the app with let's say expo SDK 33 and 25 00:01:54,940 --> 00:02:00,040 then whilst you're building it, a new version comes out, you should always follow the update or the upgrade 26 00:02:00,040 --> 00:02:04,450 guides which are released along with the new expo version. 27 00:02:04,450 --> 00:02:11,170 New expo versions simply means that some features could change, that maybe some breaking changes were 28 00:02:11,170 --> 00:02:12,930 added, some bug fixes, 29 00:02:13,000 --> 00:02:18,580 so typically you want to upgrade but you want to follow the upgrade instructions, though you don't have 30 00:02:18,580 --> 00:02:21,010 to use the latest version here to be able to deploy it, 31 00:02:21,130 --> 00:02:25,420 you can also deploy an older version here. Platforms, that should be self explanatory, 32 00:02:25,420 --> 00:02:30,520 you can describe for which platforms you want to publish and I'll remove web here because we haven't 33 00:02:30,520 --> 00:02:34,860 really focused on that and support for it also is still kind of experimental, 34 00:02:34,900 --> 00:02:40,530 so let's go with iOS and Android, then you can set a version and this number is totally up to you, in 35 00:02:40,530 --> 00:02:40,780 the end, 36 00:02:40,780 --> 00:02:46,120 you should just manage the version such that whenever you publish a new version of your app, you change 37 00:02:46,120 --> 00:02:51,400 that and you have three numbers which you can change, where typically the last number should be changed 38 00:02:51,430 --> 00:02:57,100 if a new version only includes tiny bug fixes but no major new features. The middle number should be 39 00:02:57,100 --> 00:03:02,490 changed if you have a new version that does introduce major or important new features 40 00:03:02,610 --> 00:03:07,200 and the first number should be changed whenever you have a real major new version 41 00:03:07,210 --> 00:03:12,860 that might also very well include some breaking changes or some huge changes. 42 00:03:12,880 --> 00:03:20,320 So that's kind of something which also signals your users if it's a rather big important update or just 43 00:03:20,320 --> 00:03:22,670 a small one, just a small fix. 44 00:03:22,900 --> 00:03:26,180 Orientation is a setting we already saw earlier in the course, 45 00:03:26,180 --> 00:03:30,220 there you can lock the orientation of your app. 46 00:03:30,310 --> 00:03:34,790 You can set this to default to allow for rotation or for rotating the app, 47 00:03:34,960 --> 00:03:41,370 you can set it to portrait or landscape mode to lock it down. Icon and splash screen, 48 00:03:41,370 --> 00:03:45,140 that's something I'll come back to in separate lectures soon. 49 00:03:45,150 --> 00:03:52,080 This allows you to set an app icon and an app splash screen and you just set a pointer at an input source, 50 00:03:52,080 --> 00:03:59,100 at a basic file and then expo will generate a bunch of icons for different device sizes, different 51 00:03:59,100 --> 00:04:00,980 screen sizes which is really convenient 52 00:04:00,990 --> 00:04:04,710 but again I'll come back to this in more details later. Updates, 53 00:04:04,720 --> 00:04:10,050 that's also something I'll come back to, that's related to the over the air update thing which is 54 00:04:10,050 --> 00:04:12,600 very interesting. Asset bundle patterns, 55 00:04:12,620 --> 00:04:21,450 also something I'll come back to, this kind of has an impact on how extra assets, like images that are 56 00:04:21,450 --> 00:04:22,290 part of your app 57 00:04:22,290 --> 00:04:28,050 and with that I don't mean the icon but images which you display in your app, which you store locally 58 00:04:28,080 --> 00:04:29,930 or fonts which you might be using, 59 00:04:30,000 --> 00:04:31,530 how those are distributed 60 00:04:31,530 --> 00:04:38,190 but again I'll come back to this and then you can also set platform specific settings here for iOS and 61 00:04:38,190 --> 00:04:39,750 Android. 62 00:04:39,750 --> 00:04:43,760 Now if you want to publish your app, you can do this in a very simple way, 63 00:04:43,890 --> 00:04:46,800 you just need to run expo publish. 64 00:04:46,860 --> 00:04:52,860 Now when you first run this, you will be prompted to log in with your expo account or create a new one 65 00:04:52,860 --> 00:04:54,300 if you don't have one yet. 66 00:04:54,330 --> 00:04:59,190 So simply create one, it's free, it doesn't cost you anything, you just need to create one, you can do this 67 00:04:59,190 --> 00:05:01,460 on the fly after running expo publish, 68 00:05:01,500 --> 00:05:05,980 as I said you will be prompted to create an account or log in if you aren't already 69 00:05:06,150 --> 00:05:10,870 and there you can create the account on the go in this command line here. 70 00:05:10,890 --> 00:05:13,990 All you need is an email, a username and a password. 71 00:05:14,070 --> 00:05:20,010 Once you did this and you run expo publish, this will try to publish your app and no worries, it will 72 00:05:20,010 --> 00:05:23,600 not immediately publish it to the app stores. Now 73 00:05:23,610 --> 00:05:27,780 instead let's see what happens if we try to do this, 74 00:05:27,780 --> 00:05:34,730 it now builds a Javascript bundle for Android and also for iOS. It also gave us a warning by the way 75 00:05:34,730 --> 00:05:37,430 regarding our assets not being optimized, 76 00:05:37,430 --> 00:05:39,570 that's something we can have a look at in a second 77 00:05:40,670 --> 00:05:45,730 and with all of that, it's now uploading the Javascript bundles, 78 00:05:45,740 --> 00:05:48,780 we don't know where but we'll see in a second 79 00:05:49,010 --> 00:05:51,040 and now it's done. 80 00:05:51,680 --> 00:05:55,130 So did it now create an app and upload it to the app stores? 81 00:05:55,130 --> 00:05:57,410 No, that's not what happened here. 82 00:05:57,410 --> 00:06:01,900 Instead what it did here is it created a deployment, 83 00:06:01,910 --> 00:06:04,400 it published our app to expo. 84 00:06:04,400 --> 00:06:09,190 So what you can do now is you can enter the URL which was displayed here and 85 00:06:09,260 --> 00:06:14,060 what you find is your app now hosted on expo servers 86 00:06:14,060 --> 00:06:20,860 so to say and you can scan this barcode here with a real device, with the expo client app. 87 00:06:20,870 --> 00:06:26,100 So basically what we already did during development can now be done with our published app, 88 00:06:26,120 --> 00:06:28,400 so let me briefly show this to you. 89 00:06:28,400 --> 00:06:34,220 Here's my iPhone and now again I just point my camera at this QR code or with Android, you open your 90 00:06:34,220 --> 00:06:39,650 expo app and scan the barcode there and now you can open that app in expo. 91 00:06:39,650 --> 00:06:43,010 Now again, you need the expo client installed for this. 92 00:06:43,070 --> 00:06:47,600 Now what you'll also see here on the screen however is a warning that I can't open this app because 93 00:06:48,050 --> 00:06:50,060 I'm not the author of the experience. 94 00:06:50,060 --> 00:06:55,280 So the expo client on iOS site as you see here can no longer open published projects that don't belong 95 00:06:55,280 --> 00:06:57,090 to the signed in user. 96 00:06:57,140 --> 00:06:59,450 Now that's an iOS limitation, on Android 97 00:06:59,450 --> 00:07:04,430 you would be able to open this app but of course the question is in general, why would we publish our 98 00:07:04,430 --> 00:07:05,180 app like this? 99 00:07:05,180 --> 00:07:07,270 It's very hard to reach users with this, 100 00:07:07,270 --> 00:07:12,650 they need to have the expo client app installed which almost no one has in the world, 101 00:07:12,650 --> 00:07:15,620 probably just a couple of React Native developers, 102 00:07:15,680 --> 00:07:20,000 so this is not really how we want to distribute our app, right? 103 00:07:20,030 --> 00:07:27,080 Well this is just one step of distributing our app and this is actually not how we aim to target it 104 00:07:27,110 --> 00:07:31,350 or how we aim to get it to all users over the world, 105 00:07:31,360 --> 00:07:39,070 instead this is just one step of publishing it to the app stores. This still is a nice step for you to 106 00:07:39,100 --> 00:07:45,010 now easily test your app or to share it with other users, especially on Android, on iOS 107 00:07:45,010 --> 00:07:47,940 unfortunately there are some limitations where you can't test this 108 00:07:47,950 --> 00:07:53,020 but with Android devices, you can scan this and you can share an app across users, you can show it to your 109 00:07:53,020 --> 00:07:58,060 friend and all this friend needs is the expo client app and you can scan this code and run the app 110 00:07:58,060 --> 00:08:00,070 you just built on his device. 111 00:08:00,070 --> 00:08:06,190 So for this, it's nice but of course, this is not the final solution for really publishing this to unknown 112 00:08:06,190 --> 00:08:06,730 users.