Hi and welcome back.
Today we are going to be resolving
the possible firebase issues that I mentioned about in the previous videos.
Since our package names were very
different before and they were not unique, we're gonna have to fix that up.
So we're gonna have to create a new Firebase project actually.
So let's do that together.
Inside the Firebase project Overview just
go to see all your project and here you're going to see your donation application.
Let's just create a new project from scratch.
And here let's name it Altru Donate since we renamed our application.
So let's just click on Continue and then Continue again.
And then let's select a default account for Firebase and let's create the project.
Great. So once our project is ready,
let's go inside here and start creating new projects.
So first let's create the iOS one.
And here we're going to enter our new Apple Identifier.
Let's register the application
and download the Google Services Info.plist file.
And then let's click on Next, Next and then continue to console.
And once we have the iOS project ready, let's go to Android and do the same.
And here we're going name it as Donation app Vache.
And we're going to change our package name inside the project as well.
So let's just register this app for now
and download the Google Services JSON file.
And then let's click on Next and then Next and continue to console.
So once we have this, let's set up the authentication again.
So let's get state here and then let's do the email and password setup.
Let's enable this.
Save this.
We don't have any users here yet,
so let's go just to our project setup again and let's use these two files.
Okay, so you have the Google Services JSON
file, so just overwrite this one with the new one.
Place it here and then overwrite.
And then once you do that,
let's use the new Google Service Info plist file as well.
So go to your downloads and grab
the Google Info plist file as well and just place it inside your iOS folder.
Now we have the files and all that's left
to do really is just rename our Android package name so that it's also unique.
So for that all you need to do is go
to Android and then Application here and then Source and then Main and Java.
And here you're going to see the donation
app with MainActivity, Java and Application Java.
So let's just refactor this name and call
it Donation App Vache and then click on Refactor.
And then inside here, we're going to have to go here and make
sure that the package is com donation app Vache and this as well.
And then once we have this package name,
we're going to have to rename some other stuff.
We're going to have to go to the Build gradle file inside the app actually.
So here's our Build gradle file and here.
Instead of name spacing Dom donation app, we're going to use these as well.
And then we need to go to Android app source Debug and then Java.
And then we're going to have the com donation app present here as well.
So we're going to have to refactor this and rename it.
And we're going to name it com the donation app Vache.
And I'm going to go inside here as well
and make sure that my package name is com donation app vache.
So then all we need to do is open our
terminal, go to the desktop donation app and then Android and then do
./gradlew clean.
We're going to have to wait this for a while to complete, so be patient
and once that is completed, we can see if our package renaming worked okay.
So this is successfully completed
and the I'm going to do npx react-native run-android
and this should start our Metro bundler.
And let's see if this is going to work okay, great.
It did work. Okay.
So now my application is going to open up
and since this is a completely new
project, we're going to have to create a new user.
So the user that you created for the other project are not going to work here.
So let's make sure that we register a new
user and we're able to log in inside the application.
I'm going to open my simulator here.
It's getting started.
So let's say that we don't have an account.
Let's register my user again.
I'm going to say that my email is nata@vacheishvili.com. I'm going
to create a password, and it's going to be one to nine numbers.
And then let's click on register.
We successfully have registered, and we should be redirected to this page.
And now if I do nata@vacheishvili.com
and then if I enter my password, this should work okay
and I should be logged in.
So let's click on login.
And here we go.
So our new Firebase project worked just fine.
And let's just make sure that this works fine for the iOS application as well.
Let's go to run npx react-native run-ios
and my simulator is getting started. Great.
The application has run.
So I'm going to enter my new email address
here, and then I'm going to enter my password, click on login.
This should work as well.
So we're all get we have changed our Android package name.
This will really help us in deploying the fast lane build later on once we
create the application on Google Play Store.
So that's all for today.
Thanks so much for watching, and I'll see you in the next video.