1 00:00:00,270 --> 00:00:05,110 Right, so let's take a look at our cheap one off WhatsApp clone. 2 00:00:05,460 --> 00:00:10,320 Now, I haven't cloned all the functionality of WhatsApp because I don't have a year's worth of time 3 00:00:10,320 --> 00:00:11,940 to do that as a developer. 4 00:00:12,210 --> 00:00:17,970 But I've made a basic clone here so that you can see the process that goes into it when it comes to 5 00:00:17,970 --> 00:00:23,100 using Google firebase to store the data, retrieve the data, give you notifications and things like 6 00:00:23,100 --> 00:00:23,340 that. 7 00:00:23,700 --> 00:00:26,550 So the first thing we have here is a login or register screen. 8 00:00:26,550 --> 00:00:30,810 So if I tap register, it'll tell you stuff is incorrectly formatted. 9 00:00:31,110 --> 00:00:34,320 So I'll just say blah blah at blah blah dotcom. 10 00:00:34,650 --> 00:00:39,810 And what we are using here is the standard way of logging in with Firebase. 11 00:00:39,820 --> 00:00:43,980 There are many, many ways of doing it and I'll show you a couple of them, but I won't go into the 12 00:00:43,980 --> 00:00:44,570 details. 13 00:00:44,820 --> 00:00:47,790 What we're doing here is creating a custom login. 14 00:00:48,150 --> 00:00:55,200 So I'm going to hit register and it's going to ask me to verify my password, which I'm going to do. 15 00:00:55,200 --> 00:00:57,330 And I'm just using the password password here. 16 00:00:57,660 --> 00:01:03,180 But obviously you can restrict your users so that they don't use the wrong kind of password, something 17 00:01:03,180 --> 00:01:06,180 to short to memorable, to easily guessed. 18 00:01:06,710 --> 00:01:12,330 OK, so I'm going to show you all that to our basic app as presented here once we're logged in, because 19 00:01:12,330 --> 00:01:15,450 once you're logged in, you can access all the functionality of the app. 20 00:01:15,870 --> 00:01:19,770 You can drop a message down there, say something like, hi there. 21 00:01:20,460 --> 00:01:25,230 Now, that particular message is going off to Firebase and being stored there. 22 00:01:25,410 --> 00:01:28,650 And my Internet is currently being a little bit funny here. 23 00:01:30,060 --> 00:01:33,030 So what I'm going to do is quit this. 24 00:01:34,630 --> 00:01:36,910 We're having that same problem with quitting again. 25 00:01:38,710 --> 00:01:41,290 I it is going to remove that, remove that. 26 00:01:42,260 --> 00:01:44,390 And maybe my Internet will catch up now. 27 00:01:44,660 --> 00:01:49,970 There's always trouble with the Internet and I simulator's, they always, always, always have trouble. 28 00:01:50,750 --> 00:01:55,640 So if you have problems, you might have to actually quit the simulator and restart your app through 29 00:01:55,640 --> 00:01:56,180 X code. 30 00:01:56,180 --> 00:01:56,690 Of course. 31 00:01:57,260 --> 00:02:00,010 OK, so we've actually managed to log in there. 32 00:02:00,620 --> 00:02:02,810 So these are all the messages I've been doing. 33 00:02:02,810 --> 00:02:08,990 As you know, whilst I've been developing the app, testing things out, I just been typing random characters. 34 00:02:09,140 --> 00:02:11,870 And when I press enter, there it is, it's appeared. 35 00:02:12,140 --> 00:02:13,520 So what's happening in the background? 36 00:02:13,520 --> 00:02:16,970 There is the message I'm typing is going off to Firebase. 37 00:02:16,970 --> 00:02:22,220 It's being stored in Firebase and it's also being reflected in our current UI. 38 00:02:22,670 --> 00:02:25,460 There is a live connection with Firebase. 39 00:02:25,640 --> 00:02:32,570 So if you are on a different device, on a different account or even the same account, actually the 40 00:02:32,570 --> 00:02:36,950 messages that are typed on that of account would appear here automatically. 41 00:02:37,130 --> 00:02:46,070 Every bit of data is pushed to all of the devices listening to it just as you get with WhatsApp or message 42 00:02:46,070 --> 00:02:48,290 or pretty much any messaging service these days. 43 00:02:48,740 --> 00:02:53,600 I can remember when BlackBerrys first came out and push email was insane. 44 00:02:53,600 --> 00:02:55,490 It was like, wow, this is the future. 45 00:02:55,700 --> 00:02:57,500 But now everything runs like that. 46 00:02:57,500 --> 00:02:59,000 We don't have to poll anything. 47 00:02:59,150 --> 00:03:03,410 We don't have to check if there are new messages, they just automatically get shown to us. 48 00:03:03,410 --> 00:03:03,660 Right. 49 00:03:03,980 --> 00:03:05,440 So that's the basics of the app. 50 00:03:05,450 --> 00:03:10,430 What we're going to cover and Firebase is how to log in, how to set up Firebase in the first place 51 00:03:10,430 --> 00:03:10,940 on the web. 52 00:03:10,940 --> 00:03:16,010 That is, we're going to look at stuff like pricing of Firebase, what you should do, what you shouldn't 53 00:03:16,010 --> 00:03:22,460 do, how to limit users to certain bits of data, and most importantly, how to retrieve and send data 54 00:03:22,610 --> 00:03:23,800 in real time. 55 00:03:24,020 --> 00:03:25,400 So let's begin.