WEBVTT

1
00:00:00.320 --> 00:00:01.860
Hi and welcome back.

2
00:00:01.890 --> 00:00:04.020
Today we are going to be resolving

3
00:00:04.050 --> 00:00:08.740
the possible firebase issues that I
mentioned about in the previous videos.

4
00:00:08.770 --> 00:00:11.060
Since our package names were very

5
00:00:11.090 --> 00:00:15.420
different before and they were not unique,
we're gonna have to fix that up.

6
00:00:15.450 --> 00:00:18.700
So we're gonna have to create
a new Firebase project actually.

7
00:00:18.720 --> 00:00:20.660
So let's do that together.

8
00:00:20.690 --> 00:00:24.060
Inside the Firebase project Overview just

9
00:00:24.080 --> 00:00:28.540
go to see all your project and here you're
going to see your donation application.

10
00:00:28.570 --> 00:00:31.380
Let's just create a new
project from scratch.

11
00:00:31.400 --> 00:00:36.500
And here let's name it Altru Donate
since we renamed our application.

12
00:00:36.530 --> 00:00:40.180
So let's just click on Continue
and then Continue again.

13
00:00:40.210 --> 00:00:44.940
And then let's select a default account
for Firebase and let's create the project.

14
00:00:44.960 --> 00:00:46.820
Great.
So once our project is ready,

15
00:00:46.850 --> 00:00:50.520
let's go inside here and start
creating new projects.

16
00:00:50.550 --> 00:00:53.380
So first let's create the iOS one.

17
00:00:53.410 --> 00:00:57.700
And here we're going to enter
our new Apple Identifier.

18
00:00:57.730 --> 00:00:59.660
Let's register the application

19
00:00:59.680 --> 00:01:03.860
and download the Google
Services Info.plist file.

20
00:01:03.890 --> 00:01:10.130
And then let's click on Next, Next
and then continue to console.

21
00:01:10.160 --> 00:01:14.130
And once we have the iOS project ready,
let's go to Android and do the same.

22
00:01:14.160 --> 00:01:17.850
And here we're going name
it as Donation app Vache.

23
00:01:17.880 --> 00:01:22.380
And we're going to change our package
name inside the project as well.

24
00:01:22.410 --> 00:01:24.850
So let's just register this app for now

25
00:01:24.880 --> 00:01:29.840
and download
the Google Services JSON file.

26
00:01:30.200 --> 00:01:35.140
And then let's click on Next and then
Next and continue to console.

27
00:01:35.170 --> 00:01:38.850
So once we have this, let's set
up the authentication again.

28
00:01:38.880 --> 00:01:45.210
So let's get state here and then let's
do the email and password setup.

29
00:01:45.240 --> 00:01:48.360
Let's enable this.

30
00:01:48.440 --> 00:01:49.490
Save this.

31
00:01:49.520 --> 00:01:52.490
We don't have any users here yet,

32
00:01:52.520 --> 00:01:57.260
so let's go just to our project setup
again and let's use these two files.

33
00:01:57.290 --> 00:02:01.420
Okay, so you have the Google Services JSON

34
00:02:01.450 --> 00:02:06.160
file, so just overwrite
this one with the new one.

35
00:02:07.440 --> 00:02:10.420
Place it here and then overwrite.

36
00:02:10.440 --> 00:02:11.580
And then once you do that,

37
00:02:11.610 --> 00:02:15.660
let's use the new Google Service Info
plist file as well.

38
00:02:15.690 --> 00:02:18.730
So go to your downloads and grab

39
00:02:18.760 --> 00:02:24.260
the Google Info plist file as well
and just place it inside your iOS folder.

40
00:02:24.290 --> 00:02:26.500
Now we have the files and all that's left

41
00:02:26.530 --> 00:02:33.860
to do really is just rename our Android
package name so that it's also unique.

42
00:02:33.890 --> 00:02:36.060
So for that all you need to do is go

43
00:02:36.090 --> 00:02:42.340
to Android and then Application here
and then Source and then Main and Java.

44
00:02:42.370 --> 00:02:44.740
And here you're going to see the donation

45
00:02:44.770 --> 00:02:48.380
app with MainActivity,
Java and Application Java.

46
00:02:48.410 --> 00:02:51.440
So let's just refactor this name and call

47
00:02:51.470 --> 00:02:56.580
it Donation App Vache
and then click on Refactor.

48
00:02:56.610 --> 00:02:59.610
And then inside here,
we're going to have to go here and make

49
00:02:59.640 --> 00:03:08.060
sure that the package is com
donation app Vache and this as well.

50
00:03:08.090 --> 00:03:11.940
And then once we have this package name,

51
00:03:11.960 --> 00:03:14.140
we're going to have
to rename some other stuff.

52
00:03:14.170 --> 00:03:19.940
We're going to have to go to the Build
gradle file inside the app actually.

53
00:03:19.970 --> 00:03:23.180
So here's our Build gradle file and here.

54
00:03:23.210 --> 00:03:29.640
Instead of name spacing Dom donation app,
we're going to use these as well.

55
00:03:30.040 --> 00:03:35.780
And then we need to go to Android
app source Debug and then Java.

56
00:03:35.810 --> 00:03:40.660
And then we're going to have the com
donation app present here as well.

57
00:03:40.690 --> 00:03:43.520
So we're going to have
to refactor this and rename it.

58
00:03:43.550 --> 00:03:47.660
And we're going to name it com
the donation app Vache.

59
00:03:47.690 --> 00:03:49.820
And I'm going to go inside here as well

60
00:03:49.850 --> 00:03:53.700
and make sure that my package
name is com donation app vache.

61
00:03:53.730 --> 00:03:56.060
So then all we need to do is open our

62
00:03:56.090 --> 00:04:01.692
terminal, go to the desktop donation
app and then Android and then do

63
00:04:01.892 --> 00:04:03.060
./gradlew clean.

64
00:04:03.080 --> 00:04:06.300
We're going to have to wait this
for a while to complete, so be patient

65
00:04:06.330 --> 00:04:13.140
and once that is completed, we can
see if our package renaming worked okay.

66
00:04:13.170 --> 00:04:15.740
So this is successfully completed

67
00:04:15.770 --> 00:04:20.420
and the I'm going to do npx react-native run-android

68
00:04:20.450 --> 00:04:23.180
and this should start our Metro bundler.

69
00:04:23.210 --> 00:04:26.340
And let's see if this is
going to work okay, great.

70
00:04:26.360 --> 00:04:27.460
It did work.
Okay.

71
00:04:27.480 --> 00:04:30.060
So now my application is going to open up

72
00:04:30.090 --> 00:04:32.940
and since this is a completely new

73
00:04:32.970 --> 00:04:35.540
project, we're going to have
to create a new user.

74
00:04:35.570 --> 00:04:39.660
So the user that you created for the other
project are not going to work here.

75
00:04:39.690 --> 00:04:41.860
So let's make sure that we register a new

76
00:04:41.890 --> 00:04:46.380
user and we're able to log
in inside the application.

77
00:04:46.410 --> 00:04:48.860
I'm going to open my simulator here.

78
00:04:48.890 --> 00:04:50.020
It's getting started.

79
00:04:50.040 --> 00:04:52.740
So let's say that we
don't have an account.

80
00:04:52.770 --> 00:04:56.680
Let's register my user again.

81
00:04:57.480 --> 00:05:04.620
I'm going to say that my
email is nata@vacheishvili.com. I'm going

82
00:05:04.650 --> 00:05:08.980
to create a password, and it's
going to be one to nine numbers.

83
00:05:09.010 --> 00:05:12.860
And then let's click on register.

84
00:05:12.880 --> 00:05:16.500
We successfully have registered,
and we should be redirected to this page.

85
00:05:16.530 --> 00:05:21.420
And now if I do nata@vacheishvili.com

86
00:05:21.450 --> 00:05:25.980
and then if I enter my password,
this should work okay

87
00:05:26.010 --> 00:05:27.540
and I should be logged in.

88
00:05:27.570 --> 00:05:29.620
So let's click on login.

89
00:05:29.650 --> 00:05:30.700
And here we go.

90
00:05:30.730 --> 00:05:33.860
So our new Firebase
project worked just fine.

91
00:05:33.890 --> 00:05:41.220
And let's just make sure that this works
fine for the iOS application as well.

92
00:05:41.250 --> 00:05:46.100
Let's go to run
npx react-native run-ios

93
00:05:46.130 --> 00:05:49.580
and my simulator is getting started.
Great.

94
00:05:49.600 --> 00:05:50.740
The application has run.

95
00:05:50.770 --> 00:05:54.420
So I'm going to enter my new email address

96
00:05:54.450 --> 00:06:01.380
here, and then I'm going to enter
my password, click on login.

97
00:06:01.400 --> 00:06:02.340
This should work as well.

98
00:06:02.360 --> 00:06:06.140
So we're all get we have changed
our Android package name.

99
00:06:06.170 --> 00:06:10.500
This will really help us in deploying
the fast lane build later on once we

100
00:06:10.520 --> 00:06:12.580
create the application
on Google Play Store.

101
00:06:12.600 --> 00:06:14.020
So that's all for today.

102
00:06:14.040 --> 00:06:17.080
Thanks so much for watching,
and I'll see you in the next video.

