1
00:00:08,300 --> 00:00:11,000
Everybody this is Caleb with slopes dot com.

2
00:00:11,020 --> 00:00:14,500
And in this video we're going to create our group model there.

3
00:00:14,650 --> 00:00:19,900
We're going to use that to download all of our groups from firebase and pass it to groups Visi where

4
00:00:19,900 --> 00:00:24,820
we're then going to unload it and pass it into the table view so we can see every group that we're in

5
00:00:25,840 --> 00:00:27,670
created and have been invited to.

6
00:00:27,670 --> 00:00:33,940
So let's pull open our X code project and we are going to start by going to our model group and we're

7
00:00:33,940 --> 00:00:36,900
going to right click and create a new file.

8
00:00:36,910 --> 00:00:41,690
Now of course this will be a swift file and it's going to be called group.

9
00:00:41,830 --> 00:00:46,340
Now we need to think about what kinds of things go in a group what do we need.

10
00:00:46,510 --> 00:00:52,440
Well when we add one we add title a description and we give it an array of members.

11
00:00:52,480 --> 00:00:57,940
Now something else a group should have is a unique key right which it does in firebase but we should

12
00:00:58,270 --> 00:01:00,020
add that to our model layer.

13
00:01:00,280 --> 00:01:04,510
And we should also keep track of how many members there are in our group.

14
00:01:04,530 --> 00:01:06,310
So very cool.

15
00:01:06,310 --> 00:01:13,900
Let's go ahead and let's create this class so-call class group and now we're going to create five private

16
00:01:13,900 --> 00:01:16,710
variables to hold all of those properties that we need.

17
00:01:16,780 --> 00:01:23,600
So private var underscore and we're going to go with group title of type string.

18
00:01:23,740 --> 00:01:31,510
So a group needs a title private var group description of type string.

19
00:01:31,930 --> 00:01:38,160
A group also needs a key or a unique ID of type string.

20
00:01:38,160 --> 00:01:47,980
Once a group is going to need a member count of type in pay attention to that we're also going to need

21
00:01:48,580 --> 00:01:55,730
private var members and that's going to be an array of type string.

22
00:01:55,770 --> 00:01:58,740
OK and that's going to contain all of the names of our members.

23
00:01:58,900 --> 00:02:03,550
And we're going to use that when we actually open each group and it'll pass in the member names and

24
00:02:03,550 --> 00:02:06,670
we'll show them on the View Controller for each group.

25
00:02:06,670 --> 00:02:11,950
So we now have five variables and now we're going to go ahead and set up some public variables that

26
00:02:11,950 --> 00:02:15,690
we're going to return the values of these two.

27
00:02:15,700 --> 00:02:20,810
So go ahead and create one for group title var group title of type string.

28
00:02:21,130 --> 00:02:30,190
And we're just going to return group title next group description of type String.

29
00:02:30,310 --> 00:02:34,350
We're going to return group description.

30
00:02:34,390 --> 00:02:38,500
OK keep doing this for key and the rest.

31
00:02:38,520 --> 00:02:41,440
What's key is going to return key

32
00:02:44,170 --> 00:02:50,830
and then we have member count member count of type int.

33
00:02:50,920 --> 00:02:59,410
We're going to return int member count member count then we'll have you know what.

34
00:02:59,470 --> 00:03:02,930
It's hard to see let's go ahead and put this up a little higher.

35
00:03:03,180 --> 00:03:09,060
Var members is going to be an array of string.

36
00:03:09,910 --> 00:03:15,230
And we're going to return members members.

37
00:03:15,270 --> 00:03:16,130
There we go.

38
00:03:16,510 --> 00:03:21,370
So now like any model there we need to initialize everything for when we create it.

39
00:03:21,370 --> 00:03:24,660
So let's go ahead and call in it and we're going to pass in parameters.

40
00:03:24,730 --> 00:03:29,470
So we're going to give a parameter for the title of type string.

41
00:03:29,470 --> 00:03:33,970
The description description of type string.

42
00:03:34,140 --> 00:03:39,460
The key of type string the members which is an array.

43
00:03:39,460 --> 00:03:39,900
Sorry.

44
00:03:39,900 --> 00:03:42,580
Members an array of type string.

45
00:03:42,940 --> 00:03:47,070
And then the member count of type int.

46
00:03:47,140 --> 00:03:51,960
Now to initialize we just call a self underscore group title.

47
00:03:52,450 --> 00:03:57,870
And we're going to set that to title of course self dot group description.

48
00:03:58,000 --> 00:04:03,040
It's going to be description self-taught key underscore key sorry.

49
00:04:03,070 --> 00:04:09,680
It's going to be equal to the key we pass in from our function self-taught members underscore members.

50
00:04:09,700 --> 00:04:15,280
Sorry is going to be equal to the members we pass in from our function and self-taught member count

51
00:04:15,610 --> 00:04:20,530
with an underscore is going to be equal to member member count.

52
00:04:20,530 --> 00:04:21,220
There we go.

53
00:04:21,490 --> 00:04:25,900
So when we initialize this we're going to initialize all the values and that's exactly what we need

54
00:04:25,900 --> 00:04:27,130
to do to create a group.

55
00:04:27,130 --> 00:04:31,780
We'll use this model to pass a group into the view controller when we select one.

56
00:04:31,780 --> 00:04:38,650
So for instance in our simulator here let me pull it up and open our app when we go into groups and

57
00:04:38,650 --> 00:04:44,140
if we select a group it's going to need to pass in this Daim the members the member count the key.

58
00:04:44,170 --> 00:04:49,110
All that information so it can display all the relevant messages and users on the next screen.

59
00:04:49,120 --> 00:04:51,000
That's why we're creating a model there.

60
00:04:51,070 --> 00:04:55,600
So now that we have a model where we can go ahead and write our function in our data service that's

61
00:04:55,600 --> 00:05:01,940
going to pull all the groups down from firebase and create an array of group thanks to our model there.

62
00:05:02,170 --> 00:05:07,070
So let's do that go ahead and type phunk get all groups.

63
00:05:07,620 --> 00:05:08,190
OK.

64
00:05:08,440 --> 00:05:15,680
And this function of course is going to need to return or I guess escape values from the closure.

65
00:05:15,730 --> 00:05:19,240
So we're going to use a handler like we have throughout a lot of this course.

66
00:05:19,480 --> 00:05:26,230
It's going to need to be a scaping so we can get the values out and we're going to go ahead and return

67
00:05:26,350 --> 00:05:27,100
nothing.

68
00:05:27,550 --> 00:05:34,450
But we are going to pass a value to our handler and we're just going to call this group's array which

69
00:05:34,450 --> 00:05:38,950
is going to be an array of group that's our class that we just made.

70
00:05:38,980 --> 00:05:42,900
Now we're going to go ahead and just like above we're going to create an array.

71
00:05:43,120 --> 00:05:47,530
We're going to create a for loop to cycle through all the groups and we're going to create a handler

72
00:05:47,590 --> 00:05:51,190
that's or we're going to use our handler to pass that array back once it's full.

73
00:05:51,370 --> 00:05:58,240
So go ahead and just call var group Saray and it's going to be an array of type group as you might have

74
00:05:58,240 --> 00:05:59,890
expected.

75
00:05:59,890 --> 00:06:06,040
Now we're going to go ahead and look at our group's reference so call ref groups and we're going to

76
00:06:06,040 --> 00:06:10,290
observe a single event kind of type value.

77
00:06:10,300 --> 00:06:12,230
So we're just going to pull all the values down.

78
00:06:12,580 --> 00:06:17,200
And of course we're going to have a data snapshot which we can call group snapshot.

79
00:06:17,860 --> 00:06:22,570
So what we're going to do is we're going to create a constant that's going to hold the value of all

80
00:06:22,570 --> 00:06:24,100
the objects of this snapshot.

81
00:06:24,160 --> 00:06:25,660
Then we're going to for loop through them.

82
00:06:25,660 --> 00:06:33,160
So just like before we'll type God let groups snapshot equals group snapshot children.

83
00:06:33,670 --> 00:06:35,090
Whoops sorry no s there.

84
00:06:35,110 --> 00:06:36,330
Group snapshots.

85
00:06:36,370 --> 00:06:37,070
Children.

86
00:06:37,150 --> 00:06:38,140
All objects.

87
00:06:38,380 --> 00:06:42,440
And of course we're going to cast it as an array of data snapshot.

88
00:06:42,480 --> 00:06:45,930
Else there's nothing we're just going to return.

89
00:06:46,080 --> 00:06:46,500
Very cool.

90
00:06:46,510 --> 00:06:53,290
So now that we have our group snapshot Let's go ahead and cycle through all the groups by typing for

91
00:06:54,610 --> 00:06:58,520
group in group snapshot.

92
00:06:58,510 --> 00:07:04,060
And as we do that this little arrow will go away saying that we've never used it because we did for

93
00:07:04,060 --> 00:07:06,210
group in-groups snapshot.

94
00:07:06,310 --> 00:07:11,110
We're going to basically need to pull down the array of members.

95
00:07:11,140 --> 00:07:13,970
Now we need to look at firebase to see what I'm talking about here.

96
00:07:14,080 --> 00:07:19,260
But when I created a group earlier we passed it an array of members.

97
00:07:19,270 --> 00:07:20,970
Now let's go in and look at it.

98
00:07:21,400 --> 00:07:23,880
So right here members now this is an array.

99
00:07:23,980 --> 00:07:29,270
So we need to pull it down as an array and then we basically need to pull the information from it.

100
00:07:29,290 --> 00:07:30,190
OK.

101
00:07:30,190 --> 00:07:37,390
So let's go ahead and let's set up that member array by typing let member array meaning for each member

102
00:07:37,390 --> 00:07:38,180
of the group.

103
00:07:38,560 --> 00:07:45,070
And we're going to pull out the child here or I guess the object from the child and we're going to get

104
00:07:45,070 --> 00:07:47,770
the child snapshot just like we've done for the username.

105
00:07:47,800 --> 00:07:48,130
Right.

106
00:07:48,120 --> 00:07:53,680
When we pull out the e-mail we go into each user and we pull out the snapshot of their email key and

107
00:07:53,680 --> 00:07:56,400
we get the value then we cast it as a string.

108
00:07:56,650 --> 00:07:59,450
But for the group we're going to pull down the member array.

109
00:07:59,530 --> 00:08:04,810
So we're going to take a group snapshot for the key or for the path members.

110
00:08:04,810 --> 00:08:11,450
All right we're going to cast that as an array of string.

111
00:08:11,710 --> 00:08:12,190
Yes.

112
00:08:12,190 --> 00:08:15,630
So now we have an array of members and that's awesome.

113
00:08:15,670 --> 00:08:20,950
We're getting a morning here cast from data snapshot to unrelated type string always fails.

114
00:08:21,130 --> 00:08:22,360
Oh right sorry.

115
00:08:22,360 --> 00:08:23,460
So a child snapshot.

116
00:08:23,470 --> 00:08:26,390
This is just the name of the key but we want the value.

117
00:08:26,410 --> 00:08:27,820
We want the good stuff inside.

118
00:08:27,820 --> 00:08:32,380
So we need to pull out the value and cast that as an array of string.

119
00:08:32,710 --> 00:08:39,130
So now we have a local array of strings that are the IDs for every member of our group which is really

120
00:08:39,130 --> 00:08:40,030
cool.

121
00:08:40,030 --> 00:08:42,180
So here's what we're going to do.

122
00:08:42,340 --> 00:08:45,260
We're going to get all the groups that we are a part of.

123
00:08:45,430 --> 00:08:45,680
OK.

124
00:08:45,700 --> 00:08:49,750
It doesn't matter if we download all the groups for the entire app because we might not be in every

125
00:08:49,750 --> 00:08:50,360
group.

126
00:08:50,560 --> 00:08:55,340
So what we're going to do is we're going to check to see if the member array includes us.

127
00:08:55,390 --> 00:08:56,620
So let's do that.

128
00:08:56,620 --> 00:09:00,420
If member array contains.

129
00:09:00,580 --> 00:09:01,550
And we're going to pass in.

130
00:09:01,620 --> 00:09:02,370
You ID.

131
00:09:02,530 --> 00:09:04,990
So go ahead and type Auth. off.

132
00:09:05,080 --> 00:09:10,060
Current User dot you ID and it's going to yell at us that we need to unwrap it.

133
00:09:10,090 --> 00:09:11,650
I'll fix that in a second.

134
00:09:11,650 --> 00:09:16,640
But basically what we're doing is we're just saying if this group contains me we're going to move forward.

135
00:09:16,650 --> 00:09:21,310
Because that's the one that really matters is the groups that we're in it doesn't matter if we're in

136
00:09:21,310 --> 00:09:23,870
someone or we show somebody else's group.

137
00:09:24,100 --> 00:09:29,130
So go ahead and click fix to force and wrap the ID from firebase.

138
00:09:29,380 --> 00:09:32,020
And now we're going to go ahead and build our group.

139
00:09:32,020 --> 00:09:39,560
So let's type let a group equals group and we need to pass it some parameters.

140
00:09:39,670 --> 00:09:44,920
Where can we get those firebase we have a title a description.

141
00:09:44,920 --> 00:09:46,350
We have a unique key.

142
00:09:46,450 --> 00:09:49,690
We have a list of members and we have a member count.

143
00:09:49,690 --> 00:09:57,040
So let's go ahead and let's create some variables for those let title equals group right because we

144
00:09:57,040 --> 00:10:04,780
just pulled down this group group got child snapshot for path and for the title The path is called Title.

145
00:10:04,780 --> 00:10:08,860
We need to pull out the value and force cast that as a string.

146
00:10:08,860 --> 00:10:09,340
There we go.

147
00:10:09,340 --> 00:10:11,690
Now we have a title so give it the title.

148
00:10:11,880 --> 00:10:18,580
Next we need to do descriptions so let description equals group.

149
00:10:18,610 --> 00:10:20,530
Child snapshot for path.

150
00:10:20,530 --> 00:10:21,450
Look at firebase.

151
00:10:21,460 --> 00:10:33,370
It's called description so description value as string now we have a description pulled down from firebase

152
00:10:33,380 --> 00:10:34,940
So this we're going to pass it.

153
00:10:34,950 --> 00:10:37,410
Description the key.

154
00:10:37,410 --> 00:10:42,910
The cool thing is all we have to do is type group key and we get the key members.

155
00:10:42,990 --> 00:10:47,820
All we need to do is pass it the members array which we have here.

156
00:10:47,910 --> 00:10:48,740
Pretty neat.

157
00:10:49,260 --> 00:10:54,440
And we're going to go ahead and give the member count which we can get from member array count.

158
00:10:54,480 --> 00:10:56,270
Super duper easy.

159
00:10:56,370 --> 00:10:58,680
Now we have everything that we need.

160
00:10:58,680 --> 00:11:07,210
We have a group we can append it to our group array like so group groups array append.

161
00:11:07,350 --> 00:11:11,730
And it asks for a new element of type group so let's give it one.

162
00:11:11,850 --> 00:11:12,500
Very cool.

163
00:11:12,510 --> 00:11:17,180
So we can get the title the description we have the members which we already pulled down.

164
00:11:17,220 --> 00:11:22,120
We have the members array and we can just access the count to pass in the member count.

165
00:11:22,140 --> 00:11:26,720
So outside of the for loop we're going to use our handler to pass back this array.

166
00:11:26,730 --> 00:11:31,600
So go ahead and type handler and we need an array of group.

167
00:11:33,000 --> 00:11:34,830
We have a groups array.

168
00:11:35,100 --> 00:11:35,880
That's it.

169
00:11:35,880 --> 00:11:40,350
This is all we need to do to download all the groups from our app.

170
00:11:40,350 --> 00:11:41,210
Very cool.

171
00:11:41,340 --> 00:11:46,140
We're using observed single event because when it loads that'll just load all the groups around but

172
00:11:46,410 --> 00:11:50,210
this will not give us that cool real time updating that we want.

173
00:11:50,220 --> 00:11:54,480
So we're going to have to do a little bit of a tweak in our group Visi to make it work the way that

174
00:11:54,480 --> 00:11:55,230
we're hoping.

175
00:11:55,470 --> 00:12:00,650
So go ahead and go into groups AVC and we're not going to reload the table view here.

176
00:12:00,660 --> 00:12:01,690
I'll tell you that much.

177
00:12:01,770 --> 00:12:07,740
But what we're going to do instead is we're going to go ahead and set up view did appear to download

178
00:12:07,980 --> 00:12:13,710
all of those groups add them to a local groups array here and then reload the table view.

179
00:12:13,710 --> 00:12:17,070
It's very similar to what we did in Pheed VC.

180
00:12:17,160 --> 00:12:18,870
We downloaded all the messages.

181
00:12:18,870 --> 00:12:23,610
We set our local message array and then we reloaded our table view.

182
00:12:23,670 --> 00:12:26,760
So in-groups VC we're going to actually do the same thing.

183
00:12:26,760 --> 00:12:32,820
We're going to go ahead and type var groups array and it's going to be an array of group and we're going

184
00:12:32,820 --> 00:12:34,920
to instantiate it like so.

185
00:12:34,920 --> 00:12:41,160
Next we're going to get rid of this view or get rid of the reload data in view to load and we're going

186
00:12:41,160 --> 00:12:49,600
to call you did appear you did appear then call superdog viewed it appear and pass in animated.

187
00:12:49,610 --> 00:12:56,400
Then we're going to do is we're going to call our get all groups functions so type data service instance

188
00:12:56,850 --> 00:13:01,040
get all groups that will download all the groups that involve us.

189
00:13:01,110 --> 00:13:10,730
And then when we return our array of group we'll just call this returned group array groups because

190
00:13:10,730 --> 00:13:19,410
there's more than one group we can go ahead and say self doc groups Saray equals returned groups array.

191
00:13:19,730 --> 00:13:21,980
And this is a great place to reload our table view.

192
00:13:21,980 --> 00:13:26,820
So go ahead and type self groups table view that reload data.

193
00:13:27,200 --> 00:13:31,090
And now our table is going to go ahead and reload every time that we do this.

194
00:13:31,130 --> 00:13:35,660
But remember get all groups is an observed single event function.

195
00:13:35,720 --> 00:13:40,730
It's only going to get called once and executed once if data changes on firebase.

196
00:13:40,730 --> 00:13:45,670
It's not going to get called again because we're only observing at one time not persistently.

197
00:13:45,860 --> 00:13:51,890
So what we're going to do is we're going to set up an observer in did appear to monitor when ever the

198
00:13:51,890 --> 00:13:53,650
group's array is changed.

199
00:13:53,690 --> 00:13:56,510
So let's go ahead and call ref groups.

200
00:13:56,730 --> 00:14:00,590
Oh you know what sorry we have to access our data service first because it's private.

201
00:14:00,740 --> 00:14:04,870
So data service instance ref groups.

202
00:14:05,000 --> 00:14:08,880
And outside of ref groups we're going to go ahead and observe everything.

203
00:14:09,020 --> 00:14:09,570
OK.

204
00:14:09,800 --> 00:14:15,410
Not a single event but everything we're going to observe if it's removed if it's added so that our table

205
00:14:15,410 --> 00:14:17,510
view can be updated in real time.

206
00:14:17,540 --> 00:14:22,490
Go ahead and type value because we're going to be observing for all values added subtracted changed

207
00:14:23,120 --> 00:14:25,500
and we're going to go ahead and return a snapshot.

208
00:14:25,670 --> 00:14:27,770
But we're not going to do anything with it.

209
00:14:27,770 --> 00:14:36,800
What we're going to do is instead pass this in to this closure so that when we are observing all values

210
00:14:37,070 --> 00:14:42,260
when we add a group delete a group change a group it's going to call this return our updated groups

211
00:14:42,260 --> 00:14:44,450
array and reload the table view.

212
00:14:44,480 --> 00:14:47,630
Let's go ahead and let's BuildOn run this and see what happens.

213
00:14:47,630 --> 00:14:48,940
Let's see if it works.

214
00:14:51,660 --> 00:14:53,580
And it's going to give me an error and yell at me.

215
00:14:53,580 --> 00:14:54,840
So rude.

216
00:14:54,890 --> 00:14:56,940
We go are simulator's popping up.

217
00:14:56,940 --> 00:14:57,810
There we go.

218
00:14:57,810 --> 00:14:59,040
Very good.

219
00:14:59,400 --> 00:15:04,000
And as soon as this loads we will try it out to see if our table view is properly working.

220
00:15:05,210 --> 00:15:15,860
All right here we go select groups and oh my we get to crash what's the problem.

221
00:15:16,150 --> 00:15:21,830
So could not cast value of N.S.A..

222
00:15:21,950 --> 00:15:29,530
And as array could not cast a value of type and SNL to MSRA and looks like that air is coming from where

223
00:15:29,530 --> 00:15:33,930
we tried to cast member array as a value of string.

224
00:15:33,960 --> 00:15:35,030
I see the problem.

225
00:15:35,050 --> 00:15:35,280
OK.

226
00:15:35,290 --> 00:15:36,970
Take a look in firebase.

227
00:15:36,970 --> 00:15:38,340
It's called members.

228
00:15:38,470 --> 00:15:39,970
I typed member.

229
00:15:39,970 --> 00:15:41,890
That's the danger of dealing with strings.

230
00:15:42,070 --> 00:15:46,680
Let's build and run and try it again that appeared to be the only issue we couldn't pull down an array

231
00:15:46,690 --> 00:15:48,600
because we did not have the right name.

232
00:15:48,730 --> 00:15:51,010
Embarrassing anyway.

233
00:15:51,020 --> 00:15:51,760
OK let's try it.

234
00:15:51,760 --> 00:15:54,060
Click groups get a table view.

235
00:15:54,100 --> 00:16:00,040
That looks great but it's not downloading information that's problematic.

236
00:16:01,150 --> 00:16:06,120
Let's go back and let's see what the deal is.

237
00:16:06,190 --> 00:16:12,610
Oh guys you know what we did not set up our table view yet to actually pull data from firebase we have

238
00:16:12,610 --> 00:16:14,660
only set it up to show three static cells.

239
00:16:14,830 --> 00:16:15,970
Let's change that.

240
00:16:15,970 --> 00:16:21,630
So instead of returning three rows in section we're going to return the count of groups array.

241
00:16:21,640 --> 00:16:22,740
So let's do that.

242
00:16:22,870 --> 00:16:27,000
Array does count.

243
00:16:27,230 --> 00:16:28,330
That's not what I want.

244
00:16:28,340 --> 00:16:35,040
Groups array count that will return the amount of groups that we've returned from firebase.

245
00:16:35,090 --> 00:16:40,820
Now for configuring the cell we're going to actually go ahead and pull our group from our groups array

246
00:16:41,090 --> 00:16:43,140
for this specific index path.

247
00:16:43,310 --> 00:16:52,660
So we can just call Let group equal groups array and we can pull out the element at the index path for

248
00:16:52,840 --> 00:16:54,320
the particular row.

249
00:16:54,550 --> 00:17:00,220
So if we want the cell at the first row we'll pull out the first index path from our group's array and

250
00:17:00,220 --> 00:17:04,660
that will be our group because remember groups array is of type group.

251
00:17:04,660 --> 00:17:13,450
Now that we have that group we can just go ahead and call group dot title for the title we can add group

252
00:17:14,740 --> 00:17:21,220
description and we can add group member count.

253
00:17:21,220 --> 00:17:26,800
Now if we had 100 groups it would load 100 cells and it would pass in a unique group to each cell and

254
00:17:26,800 --> 00:17:27,580
load the data.

255
00:17:27,580 --> 00:17:34,720
Let's really run this and see how we did we might even add a new group just to see how instantaneously

256
00:17:34,720 --> 00:17:35,800
it adds a new one.

257
00:17:35,830 --> 00:17:37,330
It'll be super cool.

258
00:17:37,330 --> 00:17:38,690
Click groups.

259
00:17:38,720 --> 00:17:39,690
There is not heard.

260
00:17:39,700 --> 00:17:40,660
There are four members.

261
00:17:40,660 --> 00:17:43,240
Looks like it downloaded properly from firebase.

262
00:17:43,300 --> 00:17:44,130
Let's create a new one.

263
00:17:44,170 --> 00:17:45,420
Let's see how we do.

264
00:17:45,430 --> 00:17:47,470
How about devs slopes.

265
00:17:47,650 --> 00:17:50,740
Learn to code with us.

266
00:17:50,770 --> 00:17:51,760
Very cool.

267
00:17:51,760 --> 00:17:52,000
All right.

268
00:17:52,000 --> 00:18:00,750
Let's add some folks let's add Chuck let's add Harvey Dent let's add Mark and Evan and her money.

269
00:18:01,230 --> 00:18:02,190
OK.

270
00:18:02,990 --> 00:18:04,090
There we go.

271
00:18:04,090 --> 00:18:06,220
Click done and look at that.

272
00:18:06,220 --> 00:18:07,430
Learn to code with us.

273
00:18:07,440 --> 00:18:08,170
It was instant.

274
00:18:08,170 --> 00:18:10,050
Did you see how instant that was.

275
00:18:10,050 --> 00:18:11,460
It's downloading from firebase.

276
00:18:11,470 --> 00:18:14,530
It's showing the amount of members our groups are working guys.

277
00:18:14,650 --> 00:18:15,550
This is amazing.

278
00:18:15,550 --> 00:18:21,010
So we can now download groups from firebase we can import them into our table view and show them in

279
00:18:21,010 --> 00:18:27,220
real time in the next video we're going to build group BVC where you're basically going to set up a

280
00:18:27,220 --> 00:18:33,130
similar window to the feed we see here which is public but it's going to be per group it's going to

281
00:18:33,130 --> 00:18:37,960
only allow members of the group to message each other and it's going to show all the messages for that

282
00:18:37,960 --> 00:18:39,340
is going to be super cool.

283
00:18:39,340 --> 00:18:42,520
Let's go ahead let's head over that way and let's build it out.

