1
00:00:05,220 --> 00:00:07,000
Everyone welcome back to class.

2
00:00:07,020 --> 00:00:09,180
And Johnny B he was never stop stop.

3
00:00:09,450 --> 00:00:14,130
And we're going to get this course going we are going to be learning all about firebase social logons

4
00:00:14,130 --> 00:00:18,690
we're going to be covering Facebook Google and Twitter bhajans or I.

5
00:00:18,930 --> 00:00:21,870
So let's get started and create a new X code project here.

6
00:00:21,870 --> 00:00:23,100
Let me just open that up.

7
00:00:23,100 --> 00:00:25,530
New project.

8
00:00:25,870 --> 00:00:27,440
Drag out over here.

9
00:00:27,690 --> 00:00:29,590
And this is going to be a single view.

10
00:00:29,690 --> 00:00:33,090
And I say Next don't call this firebase.

11
00:00:33,120 --> 00:00:37,850
So shall I put this on the desktop you're going to say next.

12
00:00:37,890 --> 00:00:44,900
And desktop going created get repository and that looks gyud.

13
00:00:44,910 --> 00:00:49,830
All right so the next thing we need to do is create our firebase project.

14
00:00:50,040 --> 00:00:58,640
So we're just going to open up a browser here and go ahead and navigate to your firebase console.

15
00:00:58,740 --> 00:01:03,250
So if you have a Google account then you are able to create firebase projects.

16
00:01:03,270 --> 00:01:10,320
So just go to console dot firebase Google dot com and under your account you'll be able to create new

17
00:01:10,670 --> 00:01:17,160
projects through and create a new project here and add project Hanigan going give it a project name

18
00:01:18,180 --> 00:01:21,900
when we call this firebase social.

19
00:01:22,260 --> 00:01:29,250
I want to say create and this takes just a couple of seconds to get everything set up for you.

20
00:01:29,250 --> 00:01:32,430
So once that's finished I'll be right back.

21
00:01:32,430 --> 00:01:32,610
All right.

22
00:01:32,610 --> 00:01:33,000
Perfect.

23
00:01:33,000 --> 00:01:39,210
So here we are in our dashboard and we're going to need to add firebase to our iOS app.

24
00:01:39,390 --> 00:01:45,870
So let's go ahead and click on this and we're going to need our ladies when to jump back into X code

25
00:01:46,080 --> 00:01:54,310
and right here grab our bundle identifier and copy that paste it here and we'll give it a nickname going

26
00:01:54,330 --> 00:01:59,000
to call this firebase social.

27
00:01:59,420 --> 00:02:07,340
I'm not going to do a store Id and say register app next thing we're going to need to do is download

28
00:02:07,370 --> 00:02:13,940
our config file and this holds all the information so that our app knows what database to point to and

29
00:02:13,940 --> 00:02:14,700
all that kind of stuff.

30
00:02:14,720 --> 00:02:21,470
So when I download that and once that's downloaded I'm going to go ahead and grab it and just pull it

31
00:02:21,860 --> 00:02:27,710
into our project you can just drop it right there and make sure that you have the ad to target checked

32
00:02:27,740 --> 00:02:29,170
and say finish.

33
00:02:29,630 --> 00:02:33,120
But if you were in the early stages of X code at 9.

34
00:02:33,320 --> 00:02:38,630
Make sure that you click on this and look at your file inspector over here and make sure that this target

35
00:02:38,630 --> 00:02:40,610
membership is checked.

36
00:02:40,610 --> 00:02:44,010
There's been a lot of bugs with X cotinine.

37
00:02:44,060 --> 00:02:50,960
And one of the big ones is that when you add a new file into your project the target membership is often

38
00:02:50,960 --> 00:02:52,020
not checked.

39
00:02:52,310 --> 00:02:54,070
So just just a heads up there.

40
00:02:54,290 --> 00:02:55,100
So we got that done.

41
00:02:55,100 --> 00:02:59,570
Let's jump back into firebase and see what's next going to see it continue.

42
00:02:59,990 --> 00:03:05,600
And we're going to need to initialize our pods or so we're going to be using cocoa pods to add all of

43
00:03:05,600 --> 00:03:12,350
the different STK that we're going to be using including firebase off off the Google Facebook and Twitter

44
00:03:12,350 --> 00:03:14,140
SDK that are required.

45
00:03:14,450 --> 00:03:20,500
So let's go ahead and jump into terminal here and I'm going to change our directory to our project I'm

46
00:03:20,500 --> 00:03:29,730
going to say CD and then I put that on the desktop and we called it firebase social see.

47
00:03:30,050 --> 00:03:35,440
And then we say pod in it and what this does is this initialises a pod file.

48
00:03:35,480 --> 00:03:42,800
So now if we take a look at our project folder here let me just pull it up OK.

49
00:03:42,930 --> 00:03:47,400
So now we see that we have a POD file here and I'm going to open mine with Adam.

50
00:03:47,420 --> 00:03:51,650
That's one of my preferred text editors.

51
00:03:51,830 --> 00:03:55,020
So here we go here under Pod's for firebase social.

52
00:03:55,040 --> 00:04:01,830
We're going to say pod and let's see what did our guy tell us we needed firebase core went to copy that

53
00:04:02,690 --> 00:04:05,760
and then just paste it right here.

54
00:04:06,080 --> 00:04:10,610
And I'm actually going to go ahead and tell you all of the other pods that we were going to be using

55
00:04:10,610 --> 00:04:13,380
here as well just to get it all out of the way.

56
00:04:13,400 --> 00:04:13,800
Right.

57
00:04:13,970 --> 00:04:20,580
So we have Podd and we have firebase slash off.

58
00:04:20,730 --> 00:04:20,980
OK.

59
00:04:20,990 --> 00:04:23,960
And so that's the pod the SDK for firebase.

60
00:04:23,990 --> 00:04:29,360
We're going to be using to handle all the authorization or the authentication I should say.

61
00:04:29,360 --> 00:04:39,470
And then we're going to have the pod and this is Google sign in and then pod and then we have our Facebook

62
00:04:39,470 --> 00:04:39,890
ones.

63
00:04:39,890 --> 00:04:45,110
So this is f b s d k core kit.

64
00:04:46,030 --> 00:04:57,670
And then we have f b s d k share kit and POD FBA SDK log in kit.

65
00:04:58,320 --> 00:05:03,820
And lastly we have for Twitter we have Podd Twitter kit.

66
00:05:03,840 --> 00:05:09,990
Either I'm going to save that and I'm going to just go ahead and quit out of Adam.

67
00:05:10,110 --> 00:05:14,520
And we're back here in our terminals so now that we have added the pauses to our pod file all we got

68
00:05:14,520 --> 00:05:19,360
to do is say pod install.

69
00:05:19,400 --> 00:05:20,180
All right very good.

70
00:05:20,190 --> 00:05:25,170
No says Please close in the correct code sessions and use the X-C workspace.

71
00:05:25,220 --> 00:05:28,080
So we're going to get into ex-school.

72
00:05:28,100 --> 00:05:35,180
We're going to close this project and then we're going to now when our firebase social project we now

73
00:05:35,180 --> 00:05:42,500
see that we have a white file with the extension X-C workspace so now we are going to from now on whenever

74
00:05:42,500 --> 00:05:48,270
you're working with cocoa BOD's after you install the cookie pods you work in the X-C workspace file.

75
00:05:48,350 --> 00:05:49,190
All right very good.

76
00:05:49,340 --> 00:05:55,880
So now when we open up this we see that we have a new target with pods and POD file as well as our frameworks

77
00:05:55,880 --> 00:05:56,770
and pods.

78
00:05:56,960 --> 00:05:59,050
So that is good.

79
00:05:59,060 --> 00:06:04,790
Next thing I want to do is we are going to open up our main story board and we are just going to add

80
00:06:04,820 --> 00:06:18,200
our log out button here to see button and drag that in and we will pin it say 20 from the left and 20

81
00:06:18,260 --> 00:06:24,740
from the right and 20 from the bottom we'll add those three constraints as well as I want to change

82
00:06:24,770 --> 00:06:31,310
the height to 40 and I'm going to say add one constraint and double click on it and change the label

83
00:06:31,310 --> 00:06:33,650
to log in.

84
00:06:33,650 --> 00:06:44,330
Or I should say log out and then we're going to change its text color to white and the background color

85
00:06:44,330 --> 00:06:47,740
to dark gray is good.

86
00:06:47,740 --> 00:06:50,150
Now we're going to put one label right above it.

87
00:06:50,150 --> 00:06:54,770
And this is just the label to kind of give a little bit of feedback as to whether or not we are logged

88
00:06:54,770 --> 00:06:55,520
in.

89
00:06:55,830 --> 00:07:05,730
So I'm going to go ahead and pin this 8 from the bottom 20 from the left and 20 from the right and then

90
00:07:05,730 --> 00:07:12,940
we're to change it to center aligned and change the lines to to right there.

91
00:07:13,960 --> 00:07:17,440
That I'm going to remove the text.

92
00:07:17,600 --> 00:07:18,640
Perfect.

93
00:07:18,650 --> 00:07:24,380
Now go ahead and add a couple of the outlets and actions for these I'm going to hold option and click

94
00:07:24,380 --> 00:07:30,320
on a view controller to open up our assistant editor and here in the View Controller file I'm going

95
00:07:30,320 --> 00:07:38,310
to delete this and this comment here and then here we're going to need some outlets will say I'll be

96
00:07:38,740 --> 00:07:45,820
outlets and I'm going to control and drag from our label here in the hierarchy and control drag and

97
00:07:45,820 --> 00:07:55,890
say user info label and that's and let it connect and then we're going to make an action for our log

98
00:07:55,890 --> 00:07:56,940
out button.

99
00:07:56,940 --> 00:08:06,240
So here we see action is log out tapped and that's an action and I want to close our assistant editor

100
00:08:06,590 --> 00:08:07,710
from back into our.

101
00:08:07,740 --> 00:08:11,940
If you control it us with file and that is all we are going to do.

102
00:08:11,940 --> 00:08:13,100
In this lesson.

103
00:08:13,290 --> 00:08:14,860
Just setting up the project.

104
00:08:14,970 --> 00:08:19,760
I'm getting our firebase project created and getting a little bit of set up.

105
00:08:19,760 --> 00:08:24,860
So in the next lesson we were going to jump right into Google log in and getting that all figured out.

106
00:08:24,890 --> 00:08:25,180
Right.

107
00:08:25,200 --> 00:08:26,040
So I'll see you in the next.
