1
00:00:04,680 --> 00:00:06,600
Everyone welcome back to class.

2
00:00:06,600 --> 00:00:12,520
JOHNNY B who with those slopes dot com and this lesson we are going to get our project all set up.

3
00:00:12,530 --> 00:00:15,920
All right we are going to create our firebase project.

4
00:00:15,960 --> 00:00:18,370
We are going to import some assets.

5
00:00:18,390 --> 00:00:22,310
We're going to add our cocoa pods and yes let's get to it.

6
00:00:22,320 --> 00:00:27,090
I got myself a brand new project here just go to file new project.

7
00:00:27,150 --> 00:00:27,580
OK.

8
00:00:27,660 --> 00:00:31,280
And we are going to be working with in Iowa's single view app.

9
00:00:31,290 --> 00:00:39,810
So when saying next and put in our product name and call mine random R and D M because the cool thing

10
00:00:39,810 --> 00:00:42,700
to do these days is just get rid of all those vowels right.

11
00:00:43,050 --> 00:00:43,260
All right.

12
00:00:43,260 --> 00:00:49,840
So we got random and putting your team organization name your identifier and you're going to do com.

13
00:00:49,860 --> 00:00:51,030
JOHNNY B.

14
00:00:51,120 --> 00:00:55,030
And languages of course Swift and you can leave these unchecked.

15
00:00:55,140 --> 00:01:01,040
I'm going to say next I'm going to put mine right here on the desktop and I'm going to create a good

16
00:01:01,050 --> 00:01:03,720
repository and just create.

17
00:01:03,840 --> 00:01:04,110
All right.

18
00:01:04,120 --> 00:01:06,610
Here we are now right off the bat.

19
00:01:06,640 --> 00:01:11,770
I'm going to go ahead and uncheck the landscape left and landscape right because we're just going to

20
00:01:11,770 --> 00:01:16,330
be working with portrait mode here and I'm going to change devices to iPhone.

21
00:01:16,330 --> 00:01:21,040
All right we're just going to simplify things a little bit here and we're going to put these constraints

22
00:01:21,040 --> 00:01:21,860
on it.

23
00:01:22,240 --> 00:01:22,480
All right.

24
00:01:22,480 --> 00:01:24,760
So we got our brand new project here.

25
00:01:24,760 --> 00:01:27,940
Now let's go ahead and get ready to use firebase with it.

26
00:01:27,940 --> 00:01:28,410
All right.

27
00:01:28,660 --> 00:01:31,620
So I'm going to open up a browser here Safari.

28
00:01:32,080 --> 00:01:39,250
And if you just go to fire based on Google dot com and then go to sign and you can sign in with any

29
00:01:39,250 --> 00:01:45,620
of your Google accounts and you will already be able to start using firebase.

30
00:01:45,940 --> 00:01:48,410
OK so here I am signed in.

31
00:01:48,490 --> 00:01:52,840
And you'll see something like this on your console this is that console that firebase based on Google

32
00:01:52,840 --> 00:01:53,920
dot com.

33
00:01:53,920 --> 00:01:54,140
All right.

34
00:01:54,180 --> 00:01:58,810
This is welcome to firebase tools from Google for developing great apps engaging with your users and

35
00:01:58,810 --> 00:02:00,850
earning more through mobile ads.

36
00:02:00,850 --> 00:02:03,940
All right so there is so much that firebase offers.

37
00:02:03,940 --> 00:02:08,180
There are so many tools more going to be working with of course.

38
00:02:08,330 --> 00:02:11,050
And this app is fire store all right.

39
00:02:11,290 --> 00:02:17,630
So it's going add a project to me to say add project and review of the project name going to R and D

40
00:02:17,640 --> 00:02:22,170
M and that's all goodsome to say create project

41
00:02:25,580 --> 00:02:29,590
already so here we are in our dashboard here and we've got a whole bunch of stuff here.

42
00:02:29,590 --> 00:02:36,220
We have different tools like authentication and database storage hosting functions.

43
00:02:36,340 --> 00:02:41,090
Test Lab Houlton this stuff and all of these right here analytics authentication.

44
00:02:41,360 --> 00:02:42,530
Wow so much stuff.

45
00:02:42,730 --> 00:02:47,410
We're going to be working with like I said fire store but first we need to add Firebrace to our app

46
00:02:47,470 --> 00:02:51,910
are those gwet and click right here on the Iowa since that's what we're working with right now and we

47
00:02:51,910 --> 00:02:54,620
need our Iowas bundle ID.

48
00:02:54,680 --> 00:03:01,010
I'm just going jump back into X code here and I'm going to copy our bundle ID right here.

49
00:03:01,080 --> 00:03:05,290
Then I'm going to jump back into safari and just paste it right here.

50
00:03:05,320 --> 00:03:07,870
Then we can give it an app nickname which is optional.

51
00:03:07,870 --> 00:03:12,250
I'm just going to say her and the M and AppStore idea is optional as well and is going to leave that

52
00:03:12,250 --> 00:03:17,740
as is going to say register app.

53
00:03:17,780 --> 00:03:24,680
Ok so now we're going to get a Google service dash Infocom history and this is going to have a whole

54
00:03:24,680 --> 00:03:29,600
bunch of information that is specific to our firebase account and app.

55
00:03:29,600 --> 00:03:29,930
All right.

56
00:03:29,930 --> 00:03:35,930
So when I say download all right and that has downloaded so I'm just going to jump back into X code

57
00:03:36,320 --> 00:03:41,130
and then open my downloads folder here and it's going to bring that over here.

58
00:03:41,270 --> 00:03:45,810
And you just grab it and drag it right on in.

59
00:03:46,030 --> 00:03:46,520
OK.

60
00:03:46,650 --> 00:03:51,860
And then say copy items if needed create for the references and make sure you have add two targets checked.

61
00:03:51,890 --> 00:03:53,330
All right to say finish.

62
00:03:53,330 --> 00:03:59,600
Now before I forget I'm currently at the time of this recording in code nine and there is a bug here

63
00:04:00,290 --> 00:04:06,590
that if you click on the file that we have added Google service there and put up a list and you click

64
00:04:06,590 --> 00:04:08,730
right here on the file inspector.

65
00:04:08,930 --> 00:04:15,500
Often more often than not the target membership is unchecked meaning that even though we said to add

66
00:04:15,500 --> 00:04:18,320
it to target when we imported it it did not do it.

67
00:04:18,410 --> 00:04:22,100
So you need to make sure that this is checked so I'm just going to check that right there.

68
00:04:22,100 --> 00:04:23,280
All right.

69
00:04:23,430 --> 00:04:25,810
All right so now I'm going to jump back into safari.

70
00:04:25,820 --> 00:04:29,300
We have completed the steps I'm going to say continue.

71
00:04:29,300 --> 00:04:34,910
All right so now we need to add that the firebase SDK the software development kids to our tax code

72
00:04:34,910 --> 00:04:36,350
project and we're going to use.

73
00:04:36,500 --> 00:04:38,600
We're going to do this using cocoa pods.

74
00:04:38,600 --> 00:04:39,240
All right.

75
00:04:39,470 --> 00:04:41,570
So we're just going to follow the instructions here.

76
00:04:41,570 --> 00:04:46,080
We're going to create a pod file and then we're going to add firebase core.

77
00:04:46,280 --> 00:04:52,030
And then we're ready to save the file and run roughly also going to add a fire base fire store as well

78
00:04:52,040 --> 00:04:52,570
OK.

79
00:04:52,790 --> 00:04:54,230
So let's go ahead and do this.

80
00:04:54,230 --> 00:05:01,310
I'm going to open up my terminal here and I'm going to bump up the size here for you guys to be able

81
00:05:01,310 --> 00:05:02,800
to see it easier.

82
00:05:02,810 --> 00:05:09,650
And we're just going to see you to the desk and say see the desktop and then we want random here.

83
00:05:09,720 --> 00:05:10,160
OK.

84
00:05:10,400 --> 00:05:14,810
And then I'm going to say pod in it right there.

85
00:05:15,250 --> 00:05:19,690
OK so now if we go to our full they're here on the desktop.

86
00:05:19,830 --> 00:05:20,210
See here.

87
00:05:20,210 --> 00:05:20,750
Random.

88
00:05:20,750 --> 00:05:22,360
That's our project.

89
00:05:22,610 --> 00:05:25,020
And now we have a POD file here right.

90
00:05:25,140 --> 00:05:30,950
So if you haven't used cocoa pots before check out some of our other courses where we go into depth

91
00:05:30,950 --> 00:05:32,380
on cocoa pods.

92
00:05:32,390 --> 00:05:33,710
Basically it's a plug in.

93
00:05:33,710 --> 00:05:39,440
It's an addition to your code that you can kind of just add right on to your project and use a whole

94
00:05:39,440 --> 00:05:42,600
bunch of awesome functionality that you can get out of it.

95
00:05:42,600 --> 00:05:43,190
All right.

96
00:05:43,490 --> 00:05:47,010
So to add them we need to edit our pod file and.

97
00:05:47,120 --> 00:05:52,640
And tell our project which cocoa pods which plug ins we want to add to our project.

98
00:05:52,640 --> 00:05:53,330
OK.

99
00:05:53,360 --> 00:05:59,990
So when I right click on pod file and you can open it with whatever your favorite code editor is like

100
00:05:59,990 --> 00:06:06,540
Adam or sublime but not like Microsoft Word or pages or something like that needs to be coded at or.

101
00:06:06,920 --> 00:06:12,920
So I've just opened it up and I'm going to drag it over here and we're going to uncomment this right

102
00:06:12,920 --> 00:06:13,320
here.

103
00:06:13,340 --> 00:06:17,710
Make sure that it has platform Iowa's nine point O or above.

104
00:06:17,960 --> 00:06:23,600
And then here under Pod's for random we were right to just save pod and then single quote.

105
00:06:23,930 --> 00:06:28,380
And we're went to see firebase slash core.

106
00:06:28,430 --> 00:06:35,020
We're going to say pod single quote firebase slash fire store.

107
00:06:35,290 --> 00:06:35,790
OK.

108
00:06:36,050 --> 00:06:40,220
So those are the two pods that we want to install in our project.

109
00:06:40,250 --> 00:06:50,100
I want to save that then I'm going to open the terminal back up and then went to save pod install.

110
00:06:50,170 --> 00:06:50,380
All right.

111
00:06:50,380 --> 00:06:54,970
So this is going to take just a minute and I'll be back once we have finished installing these cocoa

112
00:06:54,970 --> 00:06:59,690
pods all ready so our cocoa pods have finished installing.

113
00:07:00,010 --> 00:07:05,330
So now let's go back to X code and we need to close this.

114
00:07:05,410 --> 00:07:09,720
Once you have installed cocoa pods you no longer work in the project.

115
00:07:09,790 --> 00:07:11,730
We work in our X-C workspace.

116
00:07:11,740 --> 00:07:17,950
OK so we're going to get back to our desktop and if we open up our project folder here now you'll see

117
00:07:18,460 --> 00:07:22,330
that we were in the random Dalek's code project this blue icon.

118
00:07:22,420 --> 00:07:27,670
But now once we have installed cocoa pods we always work in the White Dot X-C workspace.

119
00:07:27,670 --> 00:07:32,590
OK so when I double click that and just open that up over here.

120
00:07:32,590 --> 00:07:33,010
All right.

121
00:07:33,040 --> 00:07:38,240
So just take a look at our project so now you'll see here that we have a folder called POD's.

122
00:07:38,260 --> 00:07:46,300
All right and we have under here framework's and Pod's in case we have a whole bunch of awesome firebase

123
00:07:46,990 --> 00:07:51,910
functionality right at our fingertips that we can now use just by adding in these cocoa bother.

124
00:07:51,910 --> 00:07:53,310
So that is pretty sweet.

125
00:07:53,650 --> 00:07:58,170
So let's zoom back into safari and see where we are in our process here.

126
00:07:58,220 --> 00:08:02,880
So we have added our firebase SDK so that's good so that we can see it continue.

127
00:08:03,220 --> 00:08:05,700
And now we need to add some initialization code.

128
00:08:05,700 --> 00:08:06,270
All right.

129
00:08:06,640 --> 00:08:12,610
So here in the delegate We are going to say import firebase and then we're going to say firebase app

130
00:08:12,740 --> 00:08:14,310
dot configure OK.

131
00:08:14,470 --> 00:08:20,380
And all this is going to do is just initialiser are apt to be ready to use firebase when I copy this

132
00:08:20,680 --> 00:08:26,320
bit of code right here the firebase app that configure and we're going to see finish and then jump back

133
00:08:26,320 --> 00:08:27,720
into X code.

134
00:08:27,970 --> 00:08:28,420
Okay.

135
00:08:28,440 --> 00:08:34,240
And going to come over here to our project and find you or delegate nuts with the file.

136
00:08:34,450 --> 00:08:42,070
And here are the imports we're going to say import firebase and then right here and the did finished

137
00:08:42,070 --> 00:08:43,660
launching with options.

138
00:08:43,730 --> 00:08:51,910
We're going to paste what we had from our setup wizard which is firebase and configure and that is it.

139
00:08:51,940 --> 00:08:56,170
We are about ready to start using firebase that is going to build this.

140
00:08:56,170 --> 00:08:59,970
Just make sure that it builds properly.

141
00:08:59,980 --> 00:09:03,930
All right Awesomes we have a successful build so things are looking good.

142
00:09:03,940 --> 00:09:09,550
All right the last thing that I want to do is add some of the assets that we are going to be using throughout

143
00:09:09,550 --> 00:09:10,160
this project.

144
00:09:10,160 --> 00:09:10,560
Okay.

145
00:09:10,810 --> 00:09:15,160
So go ahead and open up our assets that X-C assets folder right here.

146
00:09:15,460 --> 00:09:22,270
And then as part of this project in either the previous lesson of when before that you can download

147
00:09:22,360 --> 00:09:23,440
some of the assets.

148
00:09:23,470 --> 00:09:25,560
Okay so I'm here on the desktop.

149
00:09:25,570 --> 00:09:29,340
I have our assets in case I'm going to open it up.

150
00:09:29,350 --> 00:09:29,620
All right.

151
00:09:29,620 --> 00:09:30,730
That looks good.

152
00:09:30,940 --> 00:09:38,260
And you'll have a couple of folders here we have our app icon assets and then our assets right here

153
00:09:38,260 --> 00:09:44,630
so go ahead and open up the assets folder and just select all of those and drag them in.

154
00:09:44,950 --> 00:09:46,780
Okay that looks good.

155
00:09:46,780 --> 00:09:53,500
And then select our app icon right here and then we're going to go back to our Finder window and go

156
00:09:53,500 --> 00:10:03,560
back and go to our app icon assets and I'm going to go ahead and in our iPhone icons OK I'm not going

157
00:10:03,560 --> 00:10:07,160
to worry about the iPad settings or the App Store or anything like that.

158
00:10:07,160 --> 00:10:10,350
I mean you have all of those at your disposal if you want to add them.

159
00:10:10,390 --> 00:10:13,840
Right now I'm just going to add the iPhone ones because that's what's going to be most important to

160
00:10:13,840 --> 00:10:16,630
us when we are viewing them in the simulator.

161
00:10:16,630 --> 00:10:25,330
All right so we want the twenty point two and three x case twenty point two x twenty point at most twenty

162
00:10:25,330 --> 00:10:39,350
point at 3 x 2 x at 29 to 29 to X and 29 at 3 x and then 40 point at 2 and 3 x 2.

163
00:10:39,370 --> 00:10:49,720
And there's the three and then sixty point and two and three x sixty point two and sixty point at three.

164
00:10:50,110 --> 00:10:51,650
All right very nice.

165
00:10:51,700 --> 00:10:57,490
So it's going to run this and just see how it's looking so far make sure everything is running well.

166
00:10:57,490 --> 00:10:57,860
All right.

167
00:10:57,880 --> 00:11:01,280
So we got it up and running it's just a blank screen right now of course.

168
00:11:01,480 --> 00:11:05,790
What if we go to the home screen we can see our awesome icon right here.

169
00:11:05,810 --> 00:11:11,860
And so it's it's up and running and we have installed the firebase SDK.

170
00:11:11,920 --> 00:11:15,430
We got our Google service list we have.

171
00:11:15,850 --> 00:11:21,700
We have created our project in the firebase console and this is where we're going to be spending quite

172
00:11:21,700 --> 00:11:24,450
a bit of time throughout the next the lessons.

173
00:11:24,460 --> 00:11:30,460
And I know we didn't do a whole lot of firebase fire store specific stuff in this lesson this was just

174
00:11:30,460 --> 00:11:36,790
to get our project up and running and in preparation for our next lessons and the next lesson we are

175
00:11:36,790 --> 00:11:39,220
going to talk about at a high level.

176
00:11:39,220 --> 00:11:43,070
Exactly what is fire store and why you should use it.

177
00:11:43,120 --> 00:11:46,350
And yes this is going to be awesome and I'll see you in the next one.
