Right, so let's take a look at our cheap one off WhatsApp clone.
Now, I haven't cloned all the functionality of WhatsApp because I don't have a year's worth of time
to do that as a developer.
But I've made a basic clone here so that you can see the process that goes into it when it comes to
using Google firebase to store the data, retrieve the data, give you notifications and things like
that.
So the first thing we have here is a login or register screen.
So if I tap register, it'll tell you stuff is incorrectly formatted.
So I'll just say blah blah at blah blah dotcom.
And what we are using here is the standard way of logging in with Firebase.
There are many, many ways of doing it and I'll show you a couple of them, but I won't go into the
details.
What we're doing here is creating a custom login.
So I'm going to hit register and it's going to ask me to verify my password, which I'm going to do.
And I'm just using the password password here.
But obviously you can restrict your users so that they don't use the wrong kind of password, something
to short to memorable, to easily guessed.
OK, so I'm going to show you all that to our basic app as presented here once we're logged in, because
once you're logged in, you can access all the functionality of the app.
You can drop a message down there, say something like, hi there.
Now, that particular message is going off to Firebase and being stored there.
And my Internet is currently being a little bit funny here.
So what I'm going to do is quit this.
We're having that same problem with quitting again.
I it is going to remove that, remove that.
And maybe my Internet will catch up now.
There's always trouble with the Internet and I simulator's, they always, always, always have trouble.
So if you have problems, you might have to actually quit the simulator and restart your app through
X code.
Of course.
OK, so we've actually managed to log in there.
So these are all the messages I've been doing.
As you know, whilst I've been developing the app, testing things out, I just been typing random characters.
And when I press enter, there it is, it's appeared.
So what's happening in the background?
There is the message I'm typing is going off to Firebase.
It's being stored in Firebase and it's also being reflected in our current UI.
There is a live connection with Firebase.
So if you are on a different device, on a different account or even the same account, actually the
messages that are typed on that of account would appear here automatically.
Every bit of data is pushed to all of the devices listening to it just as you get with WhatsApp or message
or pretty much any messaging service these days.
I can remember when BlackBerrys first came out and push email was insane.
It was like, wow, this is the future.
But now everything runs like that.
We don't have to poll anything.
We don't have to check if there are new messages, they just automatically get shown to us.
Right.
So that's the basics of the app.
What we're going to cover and Firebase is how to log in, how to set up Firebase in the first place
on the web.
That is, we're going to look at stuff like pricing of Firebase, what you should do, what you shouldn't
do, how to limit users to certain bits of data, and most importantly, how to retrieve and send data
in real time.
So let's begin.