1
00:00:05,980 --> 00:00:09,280
Have everyone Mark Price you're at DEF slopes duck.

2
00:00:09,940 --> 00:00:15,290
And let's go ahead and get our butts working so we can actually remove the advertisements so in our

3
00:00:15,290 --> 00:00:17,570
main storyboard.

4
00:00:17,780 --> 00:00:23,030
Open up the assistant editor and what we're going to do is a few things we're going to hold some references

5
00:00:23,030 --> 00:00:27,180
to these views here so we can remember to remove them when that purchase is made.

6
00:00:27,200 --> 00:00:31,610
And then we're also going to make an action for this button so let's do the action first since it's

7
00:00:31,610 --> 00:00:32,090
right here.

8
00:00:32,090 --> 00:00:33,430
Easy.

9
00:00:33,440 --> 00:00:33,920
All right.

10
00:00:33,930 --> 00:00:39,530
And we can call this an action and remove ads pressed.

11
00:00:39,720 --> 00:00:40,420
OK.

12
00:00:40,820 --> 00:00:48,860
And the other thing I want to do is make a ibl for this as well remove ads button.

13
00:00:49,440 --> 00:00:52,690
OK let's make two more outlets.

14
00:00:52,820 --> 00:00:55,310
Let's do a

15
00:00:58,170 --> 00:00:58,720
go on there.

16
00:00:58,760 --> 00:01:01,810
That's the button the banner that's the one.

17
00:01:02,080 --> 00:01:04,900
So there there's a banner of you and we're going to make an L.

18
00:01:04,910 --> 00:01:07,500
We're going to call this a we really have to be interviewed for mine.

19
00:01:07,990 --> 00:01:09,470
So that's good.

20
00:01:09,550 --> 00:01:13,710
And then what I did want to do is the actual view here itself.

21
00:01:13,930 --> 00:01:14,500
OK.

22
00:01:14,640 --> 00:01:16,850
Now this is just off the screen.

23
00:01:16,870 --> 00:01:17,480
What's going on.

24
00:01:17,620 --> 00:01:22,500
Notice the lines here on the view itself what I want to do is something a little bit different.

25
00:01:22,930 --> 00:01:25,770
I want to make an eye out for the constraint of the height.

26
00:01:25,930 --> 00:01:32,420
OK so let's open up the right hand side and make sure we do have a height constraint OK.

27
00:01:32,620 --> 00:01:40,270
So we've got this view and it's a C here so it's from the bottom to the top.

28
00:01:41,820 --> 00:01:44,900
To the left and to the right so it's kind of filling up that whole space.

29
00:01:44,910 --> 00:01:45,870
Well let's think about this here.

30
00:01:45,870 --> 00:01:47,400
What do we actually want to do.

31
00:01:47,790 --> 00:01:49,080
If we remove this.

32
00:01:49,200 --> 00:01:51,510
We're just going to have an empty space there.

33
00:01:51,540 --> 00:01:57,300
What we can do is we can remove it from the view but it might mess up our other constraints.

34
00:01:57,300 --> 00:02:07,810
So what if what if what we do is we just remove the views altogether instead of adjusting the constraints

35
00:02:07,870 --> 00:02:12,910
let's just remove the views from the screen and the reason why I was thinking about the constraints

36
00:02:14,070 --> 00:02:18,020
is because let me teach you how you would do this if you're actually working with the table view.

37
00:02:18,250 --> 00:02:20,730
So think about this here logically.

38
00:02:21,130 --> 00:02:23,780
You've got a table view here which is one or more rows.

39
00:02:23,980 --> 00:02:28,330
If you get rid of these buttons here you would have a big empty space here which is not what we want.

40
00:02:28,340 --> 00:02:33,640
We would want the table view to go all the way to the bottom so what you could do is on this view you

41
00:02:33,640 --> 00:02:34,890
set a height constraint.

42
00:02:34,990 --> 00:02:35,470
OK.

43
00:02:35,590 --> 00:02:36,340
And I'll show you how to do that.

44
00:02:36,340 --> 00:02:38,410
Right now we're not going to do it because I don't think it applies here.

45
00:02:38,410 --> 00:02:39,580
I think there's a better way.

46
00:02:39,580 --> 00:02:41,220
But I think this is good for you to know.

47
00:02:41,470 --> 00:02:44,710
So if you wanted to make your table you go all the way down to the bottom.

48
00:02:44,740 --> 00:02:50,440
When you remove these you go to your table view let's say let's say this was the Table View OK and what

49
00:02:50,440 --> 00:02:51,340
you could.

50
00:02:51,880 --> 00:02:53,470
Well let's see where is your interview.

51
00:02:53,590 --> 00:02:54,750
Well you could do on the banner view.

52
00:02:54,760 --> 00:03:00,040
Assuming that this top is the table view is you go not the banner of the view holder here itself the

53
00:03:00,040 --> 00:03:01,090
one that's holding the other views.

54
00:03:01,090 --> 00:03:06,340
You can go to the constraints and set a height constraint on the sky just for fun.

55
00:03:06,340 --> 00:03:07,270
We'll get rid of it.

56
00:03:07,420 --> 00:03:09,250
So see how the high is 112.

57
00:03:09,430 --> 00:03:16,570
You can actually control drag from your height constraint over here and let's just call this the ADD

58
00:03:16,600 --> 00:03:17,410
folder.

59
00:03:17,550 --> 00:03:19,240
Right.

60
00:03:19,330 --> 00:03:25,030
And what you can do is when it's time to remove the advertisements you could just say add folder height

61
00:03:25,310 --> 00:03:27,780
dark constant equals zero.

62
00:03:27,780 --> 00:03:32,770
And what would happen is it sets the constraint height to zero would shrink it basically making it making

63
00:03:32,770 --> 00:03:33,640
it invisible.

64
00:03:33,790 --> 00:03:37,350
And then your table view would automatically go down for you which is really cool.

65
00:03:37,360 --> 00:03:38,310
Again we're not doing that.

66
00:03:38,320 --> 00:03:42,370
We don't have a table view here and we're just going to deal with the white space and remove these.

67
00:03:42,370 --> 00:03:45,570
But that's how you would work it to get your view to expand all the way to the bottom.

68
00:03:45,570 --> 00:03:46,910
OK.

69
00:03:48,220 --> 00:03:51,100
Good stuff to know.

70
00:03:51,120 --> 00:03:53,330
Get rid of the ad Holder right.

71
00:03:53,430 --> 00:03:57,040
I mean to get rid of it here as well too.

72
00:03:57,350 --> 00:03:58,800
We don't need to hide on that.

73
00:03:59,290 --> 00:03:59,990
OK.

74
00:04:00,400 --> 00:04:03,480
So we got the remove ads button we've got this we can remove those both.

75
00:04:03,490 --> 00:04:04,980
Which is fine.

76
00:04:05,470 --> 00:04:06,740
And I think that's what we'll do.

77
00:04:06,760 --> 00:04:08,030
We'll just we'll just remove those.

78
00:04:08,020 --> 00:04:17,530
So let's go back to our code home Visi And let's just right the logic so when the app first loads what

79
00:04:17,530 --> 00:04:18,180
do we want to do.

80
00:04:18,180 --> 00:04:23,950
In our view controller Well we want to make sure that we want to make sure that the user is supposed

81
00:04:23,950 --> 00:04:25,410
to even see ads in the first place.

82
00:04:25,420 --> 00:04:26,050
How do we do that.

83
00:04:26,050 --> 00:04:33,200
Well simple enough we can say if the ads need to show how would we do that.

84
00:04:33,290 --> 00:04:38,270
We would just probably just check against the user defaults to see if the key there is for the purchase

85
00:04:38,420 --> 00:04:40,210
that we made.

86
00:04:40,290 --> 00:04:43,590
So let's do that.

87
00:04:44,250 --> 00:04:55,500
If user defaults that standard stream for key now we want the string for the bull for key.

88
00:04:55,580 --> 00:04:56,280
We said it true.

89
00:04:56,280 --> 00:05:05,830
So the bovver key and we're going to say purchase manager instance IP remove ads.

90
00:05:06,300 --> 00:05:12,330
So OK so if there's a ball for the key this could be nil right.

91
00:05:12,330 --> 00:05:15,870
So it could be a.

92
00:05:16,020 --> 00:05:27,210
What we should we should say if let show equals.

93
00:05:29,460 --> 00:05:33,620
So maybe this isn't the best way let's just do a Neal check here.

94
00:05:33,930 --> 00:05:40,080
I don't want to store this in a variable but we want to do just see if there's something there so if

95
00:05:40,870 --> 00:05:46,980
you're ready for saturable for key blah blah blah equals nil meaning it doesn't exist so if it doesn't

96
00:05:46,980 --> 00:05:49,550
exist we know we need to show the ads.

97
00:05:49,560 --> 00:05:50,670
And I did not want to do that.

98
00:05:50,670 --> 00:05:52,190
There we go.

99
00:05:52,230 --> 00:05:53,340
That will do it.

100
00:05:53,340 --> 00:05:57,150
So if it doesn't exist let's show the advertisements.

101
00:05:57,180 --> 00:05:58,050
No big deal.

102
00:05:58,290 --> 00:06:01,620
Ok really cool.

103
00:06:01,620 --> 00:06:02,720
But if it does exist.

104
00:06:02,760 --> 00:06:12,780
What we want to do well say else let's get rid of the ads so remove ads and say remove from Superville

105
00:06:13,230 --> 00:06:20,510
and let's say Vanner view remove from a preview let's just get rid of those out of this review altogether.

106
00:06:20,790 --> 00:06:27,640
If they have made that purchase cool I like it I like it I like it.

107
00:06:28,590 --> 00:06:31,580
You know that's fine.

108
00:06:31,610 --> 00:06:32,100
We're good.

109
00:06:32,110 --> 00:06:33,150
We're good.

110
00:06:33,450 --> 00:06:34,650
So that's our code here.

111
00:06:34,650 --> 00:06:36,730
And let's actually triggered the purchase now.

112
00:06:37,260 --> 00:06:40,330
So that should be as simple as saying right.

113
00:06:40,380 --> 00:06:49,000
So purchase an injured instance purchase remove ads but we have a problem right.

114
00:06:49,020 --> 00:06:50,670
So what is the problem here.

115
00:06:50,670 --> 00:06:55,850
The problem is we have no way of knowing when the purchase succeeds or when it fails.

116
00:06:56,190 --> 00:07:00,600
So what it means is we probably need some type of callback function and we can actually use a closure

117
00:07:00,600 --> 00:07:01,140
for this.

118
00:07:01,140 --> 00:07:07,450
And what I'm going to do is over here in our purchase manager I'm going to create one and I will put

119
00:07:07,470 --> 00:07:10,680
above the class so anybody can use it we'll put it up here actually.

120
00:07:10,910 --> 00:07:15,120
We're going to create a type alias we're going to give a name to this so type alias and we're going

121
00:07:15,120 --> 00:07:17,420
to call this completion handler.

122
00:07:17,430 --> 00:07:18,420
Right.

123
00:07:18,540 --> 00:07:28,410
And we're going to if it succeeds guess what we're saying here is it takes a parameter whether it succeeds

124
00:07:28,410 --> 00:07:31,040
or not and returns nothing.

125
00:07:31,290 --> 00:07:40,470
OK so now what we can do is when we are starting a purchased purchase remove ads we can actually put

126
00:07:40,470 --> 00:07:48,900
in a completion handler that can be passed in so uncomplete escaping escaping.

127
00:07:49,290 --> 00:07:54,570
And we're going to put a lot of time to completion handler.

128
00:07:54,600 --> 00:08:00,210
So what we're doing here is this closure syntax here we're making it as a parameter that can be passed

129
00:08:00,210 --> 00:08:00,890
in.

130
00:08:01,320 --> 00:08:01,620
OK.

131
00:08:01,620 --> 00:08:07,710
And this is really cool because now what we can do is look at this right here if payment you can make

132
00:08:07,710 --> 00:08:11,610
payments and products account is great in this or what if it's not well then we should consider a failure

133
00:08:12,030 --> 00:08:20,380
so we can say else and then we can sit on comp. like so we can pass false did not succeed.

134
00:08:20,520 --> 00:08:21,340
OK.

135
00:08:21,690 --> 00:08:23,000
Now here's something interesting though.

136
00:08:23,010 --> 00:08:25,020
So we say purchased remove ads.

137
00:08:25,080 --> 00:08:29,810
So we're going to call that from our view controller but look at this it ends right here.

138
00:08:29,940 --> 00:08:35,100
We're just adding the payment and then at some later point in time update transactional we call so how

139
00:08:35,100 --> 00:08:38,870
does update transactions no to call our callback function.

140
00:08:38,880 --> 00:08:40,260
Well it doesn't yet.

141
00:08:40,290 --> 00:08:44,870
So what we need to do is actually store a completion handler.

142
00:08:44,880 --> 00:08:54,590
So what we'll do is here will say our transaction complete like so and it can be of type completion

143
00:08:54,600 --> 00:09:00,510
handler will make it an optional because we don't know if it's going to be used or not or if the user

144
00:09:00,510 --> 00:09:02,760
doesn't our developer doesn't want to implement it's fine.

145
00:09:02,940 --> 00:09:12,290
And so we've got our uncomplete here false what we need to do here is say what a recall this transaction

146
00:09:12,290 --> 00:09:17,730
and complete comp. So we'll say transaction complete equals uncomplete.

147
00:09:17,760 --> 00:09:25,500
So we're just going to store a variable of the completion handler right here with me so far you're like

148
00:09:25,500 --> 00:09:25,920
now.

149
00:09:25,950 --> 00:09:27,710
Well just bear with me.

150
00:09:27,720 --> 00:09:29,560
You can always watch the video again.

151
00:09:29,660 --> 00:09:31,290
Just during a completion handler here.

152
00:09:31,290 --> 00:09:35,010
So our view controller can know when the transaction is complete.

153
00:09:35,040 --> 00:09:39,100
So then what we do is in our update transactions.

154
00:09:39,110 --> 00:09:39,510
OK.

155
00:09:39,540 --> 00:09:42,090
This is where we can say it's done.

156
00:09:42,150 --> 00:09:49,020
So if we succeeded with the purchase we're just going to say transaction complete.

157
00:09:49,020 --> 00:09:50,120
All right we're going to say.

158
00:09:50,280 --> 00:09:51,050
True.

159
00:09:51,300 --> 00:09:51,510
OK.

160
00:09:51,510 --> 00:09:54,500
So it succeeded in this case if it failed.

161
00:09:54,510 --> 00:09:57,580
Will say that it fell transaction complete.

162
00:09:58,050 --> 00:09:59,510
I would say false.

163
00:09:59,520 --> 00:10:00,630
It did not succeed.

164
00:10:00,750 --> 00:10:04,800
And then this one would be restored would be transaction complete.

165
00:10:04,800 --> 00:10:14,430
True because it succeeded in the transaction and we do want to make sure that we just catch every single

166
00:10:14,430 --> 00:10:19,830
case here for each transaction and transactions case first default.

167
00:10:20,010 --> 00:10:24,360
And so if we get to the default block I'm going to consider it a failure.

168
00:10:26,430 --> 00:10:28,330
So that would be a controller and no.

169
00:10:28,860 --> 00:10:30,410
Awesome.

170
00:10:30,510 --> 00:10:36,630
So now all we need to do is go back to our view controller here and call this function again but we've

171
00:10:36,630 --> 00:10:37,530
changed it around right.

172
00:10:37,530 --> 00:10:46,340
So it's a purchase move adds uncomplete just press enter and we're going to say this as a success.

173
00:10:47,180 --> 00:10:49,850
And let's get rid of the parentheses we don't need those.

174
00:10:50,160 --> 00:10:53,740
And there you have it so what's going to happen is we're going to call purchased remove ads.

175
00:10:53,960 --> 00:11:01,590
It's going to go to our purchase manager OK and we're storing the callback that we just passed in and

176
00:11:01,590 --> 00:11:02,300
you're like What do we do.

177
00:11:02,310 --> 00:11:06,590
What did we pass and well look here in the view controller we're passing this block here.

178
00:11:06,600 --> 00:11:07,410
I know it sounds weird.

179
00:11:07,410 --> 00:11:08,820
It's very weird syntax right.

180
00:11:08,820 --> 00:11:17,320
BLOCK syntax is are closer syntax is very weird but we were passing in this closure and so in our purchase

181
00:11:17,320 --> 00:11:19,940
manager we're storing that closure here.

182
00:11:20,070 --> 00:11:24,520
And then when the payment is actually done we finish it like so.

183
00:11:24,780 --> 00:11:25,350
OK.

184
00:11:25,390 --> 00:11:30,420
We call it which is going to pass a variable the boolean right in here.

185
00:11:30,660 --> 00:11:32,010
OK.

186
00:11:32,180 --> 00:11:37,080
No complex closures are very complex you don't have to understand it in order to know how to use them.

187
00:11:37,350 --> 00:11:39,000
And it just takes some time.

188
00:11:39,000 --> 00:11:41,360
Lots of times and done so right.

189
00:11:41,370 --> 00:11:42,430
So what do we do now.

190
00:11:42,450 --> 00:11:45,980
Now that we know when something succeeding or failing What do we do.

191
00:11:46,230 --> 00:11:50,520
Well first things first is when we actually purchased the remove ads.

192
00:11:50,520 --> 00:11:53,760
We probably should show a loadings for it or we're not going to do that.

193
00:11:53,790 --> 00:11:59,880
You can do that on your own time but it's called an ACH activity indicator.

194
00:11:59,880 --> 00:12:06,630
You can show a loading spin or activity indicator and then what we would do here is when we get the

195
00:12:06,630 --> 00:12:07,890
call back we should dismiss it.

196
00:12:07,890 --> 00:12:12,990
So you know we would dismiss the spinner and then what do we do.

197
00:12:13,020 --> 00:12:17,190
Well if it was successful we don't need parentheses in here.

198
00:12:17,190 --> 00:12:19,080
This isn't javascript.

199
00:12:19,080 --> 00:12:26,340
If it was successful we'll say self-taught banner ad or interview remove from Superville and we'll say

200
00:12:26,340 --> 00:12:35,720
self dot What was the purchase button but and move ads button remove from Super view.

201
00:12:35,730 --> 00:12:40,830
We'll just remove those from the Super view and we know that we're already storing it in the end user

202
00:12:40,830 --> 00:12:43,860
defaults from the purchase manager.

203
00:12:43,920 --> 00:12:45,340
So we don't need to do that here.

204
00:12:45,630 --> 00:12:50,650
And then of course if it was a failure what would you do you might give a message to the user so would

205
00:12:50,650 --> 00:12:59,580
be else no show message to the user why it failed and then they can take appropriate action.

206
00:13:00,000 --> 00:13:00,740
So cool.

207
00:13:00,870 --> 00:13:06,900
So remove ads press let's follow the chain of events we call the function and purchase the product which

208
00:13:06,900 --> 00:13:07,850
is up here.

209
00:13:07,980 --> 00:13:09,330
And then we start the payment.

210
00:13:09,450 --> 00:13:10,450
That's great.

211
00:13:10,620 --> 00:13:15,900
Remove ads product and then we store the completion handler and then if it's successful what do we do

212
00:13:16,290 --> 00:13:20,100
we set the user defaults here to true.

213
00:13:20,190 --> 00:13:24,390
And then we complete the transaction very very very very cool.

214
00:13:24,390 --> 00:13:26,070
So let's go ahead and run this.

215
00:13:26,100 --> 00:13:27,480
You've got to run it from your phone.

216
00:13:27,560 --> 00:13:28,030
OK.

217
00:13:28,080 --> 00:13:30,980
You've got to run it from your phone in order for this to work.

218
00:13:30,990 --> 00:13:36,800
So let's go ahead and get it set up here on our phone.

219
00:13:37,310 --> 00:13:40,190
I just realized that our our logic here is incorrect.

220
00:13:40,210 --> 00:13:41,960
It's giving us a warning here.

221
00:13:42,200 --> 00:13:47,450
Let's fix this so I forgot the object for key can return nil.

222
00:13:47,450 --> 00:13:51,440
But if you're working with a boolean it'll actually return true or false no matter even if the key exists

223
00:13:51,440 --> 00:13:51,680
or not.

224
00:13:51,680 --> 00:13:52,130
So that's good.

225
00:13:52,130 --> 00:13:55,750
All we need to do is adjust this slightly so.

226
00:13:56,030 --> 00:14:00,430
So if it's true that's all we needed to say like that.

227
00:14:00,440 --> 00:14:06,290
Or rather we can just probably do that let's build it and determine it as true or false since it's a

228
00:14:06,290 --> 00:14:07,790
native value type.

229
00:14:07,790 --> 00:14:11,840
So rather than again seeing if it's nil it won't be nil.

230
00:14:11,840 --> 00:14:16,580
It'll give you a true or false value only for only for native value types like bullion here.

231
00:14:16,580 --> 00:14:20,230
So if it's true it means we've saved it there.

232
00:14:20,240 --> 00:14:20,780
Great.

233
00:14:20,810 --> 00:14:27,560
Well it means actually means the opposite we need to move this code.

234
00:14:27,740 --> 00:14:37,130
Yeah if it exists it means that's what it means if it exists it will return true which means remove

235
00:14:37,130 --> 00:14:38,750
the ads because we've purchased it.

236
00:14:38,750 --> 00:14:41,910
Otherwise it will return false.

237
00:14:41,930 --> 00:14:43,890
That's our logic here.

238
00:14:46,870 --> 00:14:47,610
Wonderful.

239
00:14:47,790 --> 00:14:48,320
OK.

240
00:14:48,550 --> 00:14:50,700
That is good.

241
00:14:50,710 --> 00:14:56,760
Now what we're gonna do is run on our device and it has to be ran on a device simulator does not work.

242
00:14:57,460 --> 00:14:57,700
OK.

243
00:14:57,700 --> 00:14:58,650
So there's our ads.

244
00:14:58,660 --> 00:14:59,220
That's great.

245
00:14:59,220 --> 00:15:02,940
Everything is running just as it should.

246
00:15:03,230 --> 00:15:03,820
OK.

247
00:15:03,970 --> 00:15:09,190
So with your app running in order for us to properly test this you're going to need to log out of your

248
00:15:09,610 --> 00:15:10,600
iTunes account.

249
00:15:10,600 --> 00:15:16,120
You've got to now use that sandbox tester so what I want you to do is close the app or just go to the

250
00:15:16,120 --> 00:15:19,910
home screen and then go to the App Store.

251
00:15:20,650 --> 00:15:27,670
And what you're going to do is click if you're on the if you're on a previous version earlier than iOS

252
00:15:27,790 --> 00:15:32,320
11 you're going to go to the Home tab of the store and go all the way to the bottom.

253
00:15:32,320 --> 00:15:36,760
Otherwise go to your Updates tab and click your profile picture and what you're going to do is sign

254
00:15:36,760 --> 00:15:37,960
out of your account.

255
00:15:38,320 --> 00:15:38,790
OK.

256
00:15:38,890 --> 00:15:42,650
So sign out of your iTunes account and then go back to the app.

257
00:15:43,020 --> 00:15:43,620
OK.

258
00:15:46,270 --> 00:15:50,080
And now that you're back in the app you can actually sign in with a tester account.

259
00:15:50,080 --> 00:15:55,850
So if I click the remove ads button it's asking us to sign in.

260
00:15:55,860 --> 00:15:59,060
It's asking us because Apple's prompting it because we're going to make a purchase.

261
00:15:59,070 --> 00:16:05,250
I'm going to use my existing Apple I.D. which was testor one two three the one that we created 1 2 three

262
00:16:08,880 --> 00:16:15,360
have slopes to come put in a password and clicking by

263
00:16:19,240 --> 00:16:21,330
sometimes has issues we'll try again.

264
00:16:23,160 --> 00:16:29,250
I always find that there's issues with with making purchases and test accounts it usually takes a few

265
00:16:29,250 --> 00:16:31,010
time so we're going to try again.

266
00:16:33,780 --> 00:16:34,660
There we go.

267
00:16:34,740 --> 00:16:40,550
It's asking us if we want to buy remove ads for 399 which we do.

268
00:16:40,860 --> 00:16:41,570
You're all set.

269
00:16:41,570 --> 00:16:42,950
Your purchase was successful.

270
00:16:42,950 --> 00:16:43,420
And look at that.

271
00:16:43,420 --> 00:16:44,480
It worked.

272
00:16:44,480 --> 00:16:46,030
Everything in our entire process worked.

273
00:16:46,030 --> 00:16:49,290
So we went through the process we signed in with a test account we made the purchase.

274
00:16:49,370 --> 00:16:53,240
It showed the sandbox purchase even had a little square braces that said sandbox.

275
00:16:53,360 --> 00:17:00,230
And then it came back and hit our callback function and it removed the advertisements for us.

276
00:17:00,230 --> 00:17:02,110
Pretty darn cool.

277
00:17:02,710 --> 00:17:03,000
OK.

278
00:17:03,020 --> 00:17:07,790
So here in our view controller we came all the way back here and in the success and are removed and

279
00:17:07,790 --> 00:17:08,900
you notice how it took a while.

280
00:17:08,960 --> 00:17:12,160
Which is why you need to show a loading spin or some type of pop up to your user.

281
00:17:12,260 --> 00:17:16,570
So it's a nice elegant experience so we successfully made a purchase.

282
00:17:16,620 --> 00:17:18,070
So we're going to call this video done.

283
00:17:18,080 --> 00:17:22,370
And in the next video we're going to wrap up by restoring in-app purchases in the case that the user

284
00:17:22,370 --> 00:17:26,960
has deleted their device so are their app from the device so that's it for now.

285
00:17:26,960 --> 00:17:28,870
Mark Price at does slopes dot com.

286
00:17:28,880 --> 00:17:30,710
Let's move forward.

