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