0
1
00:00:00,740 --> 00:00:07,730
In the last lesson, we managed to use the Codable protocol to save our to-do list items into plist
1

2
00:00:08,000 --> 00:00:12,560
and we were able to retrieve it and add new items as we pleased.
2

3
00:00:12,590 --> 00:00:21,710
The next step is embark on a new journey and a new way of persisting our data. For this lesson and a
3

4
00:00:21,710 --> 00:00:27,170
lot of the coming lessons, we're going to be diving into Core Data. And I'm going to walk you through
4

5
00:00:27,200 --> 00:00:31,210
how we can perform all of the CRUD operations using Core Data.
5

6
00:00:31,220 --> 00:00:37,130
But first, we need to learn how to set up and configure our Core Data DataModel in order to use it in
6

7
00:00:37,130 --> 00:00:38,180
our projects.
7

8
00:00:38,180 --> 00:00:43,750
Now, the first thing if you remember is that when we choose a template to create a new project, there's
8

9
00:00:43,760 --> 00:00:47,510
this checkbox here that says Use Core Data.
9

10
00:00:47,660 --> 00:00:52,040
Now, for our current project, I asked you not to check it because we were going to be looking into various
10

11
00:00:52,040 --> 00:00:57,180
different methods of persisting our data before we come to this module.
11

12
00:00:57,200 --> 00:01:07,730
So if we have a look, let's just create a CoreDataTest app and I'm going to check use Core Data,
12

13
00:01:07,820 --> 00:01:09,170
and we're going to hit Next,
13

14
00:01:09,500 --> 00:01:12,460
and I'm going to save it onto my desktop.
14

15
00:01:12,530 --> 00:01:15,190
And don't worry about creating a git repository.
15

16
00:01:15,190 --> 00:01:21,780
We're just gonna have a look at this test project to see what automatically gets created by Xcode
16

17
00:01:21,920 --> 00:01:27,230
when you check that tick box. Now, the first thing that you notice that's different from your normal template
17

18
00:01:27,320 --> 00:01:35,150
is that you get this Core Data DataM
odel. And inside here is where we set up all of our data and structure
18

19
00:01:35,150 --> 00:01:37,040
it for use with Core Data.
19

20
00:01:37,040 --> 00:01:44,420
The other thing that Xcode adds is inside the AppDelegate, it adds a whole bunch of helper code which
20

21
00:01:44,420 --> 00:01:48,080
you're going to need every single time you use CoreData.
21

22
00:01:48,110 --> 00:01:52,460
So they've just given it to you for free when you tick that checkbox.
22

23
00:01:52,460 --> 00:01:54,460
So what are we going to do in our project?
23

24
00:01:54,470 --> 00:01:58,970
Are we gonna have to rewrite it from scratch and tick that checkbox?
24

25
00:01:58,970 --> 00:02:04,730
I mean there's a lot of cases when you make an app when you--and you don't know that you need to persist
25

26
00:02:04,790 --> 00:02:06,940
your data using Core Data,
26

27
00:02:07,100 --> 00:02:10,880
maybe, you know, initially, you thought, "Oh, it's gonna be a really small amount of data,
27

28
00:02:10,910 --> 00:02:12,880
I'm just going to persist it using plist."
28

29
00:02:13,040 --> 00:02:18,350
But then at some point, you realize that it's actually become this behemoth and you now need some sort
29

30
00:02:18,350 --> 00:02:20,270
of formal DataModel manager.
30

31
00:02:20,300 --> 00:02:26,540
So that's why we created this project Todoey without checking that use Core Data checkbox, so that
31

32
00:02:26,540 --> 00:02:31,610
I can show you how you can add Core Data to any project even at a later date.
32

33
00:02:31,850 --> 00:02:36,250
So the first thing that we're going to do is we're going to add that Core Data model.
33

34
00:02:36,290 --> 00:02:43,310
We're going to go to File, New, File. And we've normally been playing around with this section which is
34

35
00:02:43,310 --> 00:02:49,160
the source, but now, I want you to scroll down to the section that's called Core Data and we're going
35

36
00:02:49,160 --> 00:02:53,180
to create a new Data Model, and hit Next.
36

37
00:02:53,180 --> 00:02:57,280
Now, we're going to call this Data Model, DataModel.
37

38
00:02:57,290 --> 00:03:01,340
I know it's not very imaginative, but it makes sense to most people.
38

39
00:03:01,460 --> 00:03:08,090
And I'm going to drag it out of controllers and put it inside DataModel where it fits in much better.
39

40
00:03:08,090 --> 00:03:14,690
Now, if we go back to that CoreDataTest app where we checked using Core Data, we can actually just simply
40

41
00:03:14,690 --> 00:03:24,830
copy and paste all of this code up to and including applicationWillTerminate, and we can paste it into
41

42
00:03:25,280 --> 00:03:27,020
our project.
42

43
00:03:27,020 --> 00:03:32,640
So I'm going to delete applicationWillTerminate and I'm going to paste what we copied over instead.
43

44
00:03:32,690 --> 00:03:39,410
Now, EXCO is going to complain because it doesn't know what persistent containers are unless we, of course,
44

45
00:03:39,520 --> 00:03:42,470
import the CoreData framework.
45

46
00:03:42,470 --> 00:03:49,070
And one thing we have to check to make sure is that the name here where it says the persistent container
46

47
00:03:49,070 --> 00:03:53,010
name has to match with the name of our DataModel.
47

48
00:03:53,120 --> 00:03:57,740
And if you remember, we called ours DataModel with a capital "D" and the capital ",."
48

49
00:03:57,740 --> 00:04:04,700
so we have to make sure that when we copy this code over, that we have to change this to match our 
49

50
00:04:04,700 --> 00:04:06,020
"DataModel" name.
50

51
00:04:06,080 --> 00:04:15,410
So, now at this point, our project for Todoey is exactly the same as if we checked that box to include
51

52
00:04:15,410 --> 00:04:21,500
Core Data. So we can now close down this CoreDataTest project and we can delete it because we're not
52

53
00:04:21,500 --> 00:04:22,690
going to need it anymore.
53

54
00:04:22,700 --> 00:04:29,090
We've already gotten all the code that we got given from Xcode and we've incorporated it into our current
54

55
00:04:29,090 --> 00:04:30,000
project.
55

56
00:04:30,020 --> 00:04:35,900
Now, let's head over to our DataModel and we're going to create a new entity.
56

57
00:04:35,930 --> 00:04:40,950
So you'll notice that when you start working with Core Data, it's almost like we're in a different world.
57

58
00:04:41,000 --> 00:04:45,410
They use different words for things that we already have a good grasp of.
58

59
00:04:45,410 --> 00:04:53,360
So, for example, entities are pretty much equivalent to classes, and each entity has a whole bunch of attributes,
59

60
00:04:53,690 --> 00:04:58,410
and those attributes are almost like our properties that we've gotten used to.
60

61
00:04:58,670 --> 00:05:05,560
But you can also consider that each entity is basically like a table of data.
61

62
00:05:05,630 --> 00:05:12,290
So for every single Excel sheet that you have, you might have a single entity inside your Dore Data data
62

63
00:05:12,290 --> 00:05:13,280
model.
63

64
00:05:13,280 --> 00:05:16,610
So let's get started and we'll explain as we go along.
64

65
00:05:16,670 --> 00:05:21,560
So we're gonna go over here and we're going to click on Add Entity which gives us this brand-new entity
65

66
00:05:21,650 --> 00:05:26,340
and we're going to rename it to something that makes sense, rather than just Entity, right?
66

67
00:05:26,360 --> 00:05:33,340
So you can do that either by clicking here or you can also just edit it in the attribute pane.
67

68
00:05:33,350 --> 00:05:39,980
So, now inside our right-hand pane, you can see that we've got this new icon that looks to me a little
68

69
00:05:39,980 --> 00:05:41,460
bit like a welding mask.
69

70
00:05:41,540 --> 00:05:44,600
I don't know why it represents Core Data, but it just does.
70

71
00:05:44,600 --> 00:05:49,700
So this is the pane under which we're going to edit all of our properties related to our entities and
71

72
00:05:49,700 --> 00:05:51,050
our attributes.
72

73
00:05:51,050 --> 00:05:57,920
And it's also here that we can change the name of our entity and we're going to call ours Item because
73

74
00:05:57,920 --> 00:06:01,210
that's what this class or entity is going to represent.
74

75
00:06:01,280 --> 00:06:06,950
It's going to represent individual items just as we did here using our class.
75

76
00:06:06,980 --> 00:06:12,560
And if you look at our class, you can see that it has two properties which we now know are called attributes
76

77
00:06:12,560 --> 00:06:13,530
in Core Data.
77

78
00:06:13,550 --> 00:06:19,490
So we need to add these two attributes to our item entity and we do that by clicking this plus arrow
78

79
00:06:19,490 --> 00:06:20,350
here.
79

80
00:06:20,360 --> 00:06:27,950
So the first attribute, we're going to call title and the type of it is going to be String. In the attribute
80

81
00:06:27,950 --> 00:06:28,510
pane,
81

82
00:06:28,520 --> 00:06:35,300
there's this checkbox called Optional. And we want to make sure that each and every item must have a
82

83
00:06:35,300 --> 00:06:38,700
title because, I mean, otherwise, what are you saving, right?
83

84
00:06:38,780 --> 00:06:41,210
If an item doesn't even have a title.
84

85
00:06:41,240 --> 00:06:47,420
Now, so we have to uncheck that box where it says Optional and make this a required attribute.
85

86
00:06:47,420 --> 00:06:51,350
Now, there's other attributes to these entities that might be optional,
86

87
00:06:51,350 --> 00:06:55,760
for example, like a due date for each item. But the title is not,
87

88
00:06:55,850 --> 00:06:57,950
so let's go ahead and add that.
88

89
00:06:57,950 --> 00:07:03,950
Now, the next thing that we're going to add is the done attribute and this is going to be a Boolean,
89

90
00:07:03,980 --> 00:07:08,930
so we can select like that down here,
and we're going to make this attribute nonoptional as well.
90

91
00:07:08,930 --> 00:07:16,250
So, now you can see that we've essentially replaced our Item class with our item entity and all of its
91

92
00:07:16,340 --> 00:07:17,510
attributes.
92

93
00:07:17,510 --> 00:07:24,590
So we can now safely delete our Item class and move it to Trash because we've essentially replaced what
93

94
00:07:24,590 --> 00:07:26,950
it does using Core Data.
94

95
00:07:26,960 --> 00:07:33,860
Now, there's one last thing that we need to do inside our DataModel inspector and that is to change
95

96
00:07:33,890 --> 00:07:38,000
the module from global namespace to Current Product Module.
96

97
00:07:38,000 --> 00:07:43,190
Now, this is something that probably won't break our project at this stage, but it's something to be aware
97

98
00:07:43,190 --> 00:07:43,470
of
98

99
00:07:43,490 --> 00:07:48,680
once your Core Data project gets more and more complicated, especially if your app requires multi-threading,
99

100
00:07:48,860 --> 00:07:54,500
you might end up with weird errors if you don't select this as Current Product Module.
100

101
00:07:54,500 --> 00:08:00,160
Now, the other thing that you'll notice here is that there is this property called Codegen.
101

102
00:08:00,290 --> 00:08:02,830
And if you click on it, there's three options.
102

103
00:08:02,840 --> 00:08:04,660
Now, let's go through what each does.
103

104
00:08:05,210 --> 00:08:12,410
So the current and the default selection is called Class Definition, and what this does is that it converts
104

105
00:08:12,530 --> 00:08:20,270
your data, your entities, and your attributes into classes and properties, so you can use them and manipulate
105

106
00:08:20,270 --> 00:08:24,860
them just as you would if you had created a class with these properties.
106

107
00:08:24,860 --> 00:08:31,880
Now, the slimy mysterious thing is that when Xcode automatically generates these classes, it doesn't
107

108
00:08:31,880 --> 00:08:38,630
show up in our project navigator, so we can't actually view it unless we're really determined.
108

109
00:08:38,750 --> 00:08:43,870
So if you are really determined to find it and have a look at it, then you can follow along with me.
109

110
00:08:43,880 --> 00:08:49,940
Alternatively, you can just watch me show you where it is and trust that your code file is also automatically
110

111
00:08:49,940 --> 00:08:54,350
being generated as long as you've got that Class Definition checked.
111

112
00:08:54,560 --> 00:09:00,350
Now, in order to locate those files, all we have to do is head into Finder and we're going to navigate
112

113
00:09:00,410 --> 00:09:02,040
right into the root.
113

114
00:09:02,090 --> 00:09:08,060
So if you have difficulty finding your Macintosh hard drive, then all you have to do is just on any given
114

115
00:09:08,060 --> 00:09:14,540
folder, hit command and hit the up arrow, and this will take you all the way up until you can no longer
115

116
00:09:14,600 --> 00:09:20,030
go up any further,and you should be at your Macintosh HD which is your root. From here,
116

117
00:09:20,030 --> 00:09:24,350
you're going to go into the Users folder, and then you're going to find your current logged in user
117

118
00:09:24,380 --> 00:09:27,070
username, and then we're going to go into Library.
118

119
00:09:27,080 --> 00:09:33,140
Now, if you don't see a library inside your Users folder, then all you have to do is just open up Terminal
119

120
00:09:33,320 --> 00:09:40,460
and type  chflags nohidden ~/Library/ and hit enter and that will make your library folder
120

121
00:09:40,610 --> 00:09:47,960
unhidden inside Finder. And inside Library, we're going to go to Developer, and then Xcode, 
121

122
00:09:48,050 --> 00:09:52,180
and DerivedData, and then in this folder, we're going to find our Todoey app.
122

123
00:09:52,310 --> 00:09:56,270
So it should be called Todoey with a whole bunch of jumbled letters afterwards.
123

124
00:09:56,270 --> 00:10:02,910
And here, we're going to look for a folder called Build. and inside Build, we're going to go into Intermediates,
124

125
00:10:03,370 --> 00:10:10,980
and then Todoey.build, and then Debug, Todoey.build, and then we're going to go to DerivedSources.
125

126
00:10:11,140 --> 00:10:15,340
And finally, CoreDataGenerated, and DataModel.
126

127
00:10:15,340 --> 00:10:20,710
So it's a long path to chase down but, eventually, you get here.
127

128
00:10:20,890 --> 00:10:28,510
And what do we find? We find three Swift files which is the name of your entity and Properties, and your
128

129
00:10:28,600 --> 00:10:31,120
Item, and your Core Data class.
129

130
00:10:31,120 --> 00:10:37,270
So if we double click on it, it should open inside Xcode, and we can have a look at what they look like.
130

131
00:10:37,480 --> 00:10:45,090
So the two most important files that Xcode generates for you is your Item class and your Item properties.
131

132
00:10:45,130 --> 00:10:52,570
So the Item class file gets generated once and it doesn't get modified unless you've deleted the entity
132

133
00:10:52,600 --> 00:10:58,570
or you add a new entity.Bbut this file, the Core Data properties for your items,
133

134
00:10:58,570 --> 00:11:00,350
this has regenerated many times.
134

135
00:11:00,430 --> 00:11:05,980
So if you try to write any code in here, it seems to get wiped and replaced with whatever xcode wants
135

136
00:11:05,980 --> 00:11:06,670
to put in here.
136

137
00:11:06,760 --> 00:11:13,360
So these are both not good places for you to put your own code. If you wanted to put in your own custom
137

138
00:11:13,360 --> 00:11:21,040
initializers or custom functions for your Item class, then instead of using the default which is class
138

139
00:11:21,040 --> 00:11:27,490
definition, you'll want to use Categories/Extension. And if you have this selected, then you need
139

140
00:11:27,490 --> 00:11:34,330
to create your classes that are identically named to your entities, and Xcode will automatically link
140

141
00:11:34,330 --> 00:11:36,250
them up to allow you to use CoreData.
141

142
00:11:36,250 --> 00:11:42,200
Now, the other option here is Manual/None where there is, literally, no cogeneration at all,
142

143
00:11:42,220 --> 00:11:46,210
there's no linkages behind the scenes, and you have to do all the work yourself.
143

144
00:11:46,660 --> 00:11:52,600
And this is probably the one that's least used in practice. And the class definition is probably the
144

145
00:11:52,600 --> 00:11:56,710
one that's least effort, quickest to set up, and easiest to understand.
145

146
00:11:56,920 --> 00:12:01,570
But the one that's actually most used, that you'll see in the wild is actually the category extension
146

147
00:12:01,660 --> 00:12:06,370
because sometimes developers might want to add in some custom code, and so you'll see that used pretty
147

148
00:12:06,370 --> 00:12:06,850
often.
148

149
00:12:06,850 --> 00:12:12,230
But I would say that a lot of people do use Class Definition as well, just because it's so easy to implement.
149

150
00:12:12,340 --> 00:12:14,210
And that's the one that we're going to use.
150

151
00:12:14,380 --> 00:12:21,340
So if we have a look back at the Swift file where Xcode automatically generated this class declaration
151

152
00:12:21,610 --> 00:12:30,880
for our Item entity, then you'll see that our Item entity inherits or subclasses NSManagedObjects.
152

153
00:12:31,260 --> 00:12:35,330
An NSManagedObjects are basically Core Data model object.
153

154
00:12:35,410 --> 00:12:41,320
It's similar but not quite the same as our standard objects, but by subclassing NSmanagedObject,
154

155
00:12:41,590 --> 00:12:45,060
it allows us to manage this class using CoreData.
155

156
00:12:45,070 --> 00:12:51,460
So if you do create your own custom classes and you go for the option of Categories/Extension,
156

157
00:12:51,820 --> 00:12:57,430
then you'll also want to inherit from NSManagedObjects in order for your code to work.
157

158
00:12:57,430 --> 00:13:02,470
So, now that we've seen the automatic code that gets generated behind the scenes, let's take a look at
158

159
00:13:02,470 --> 00:13:05,740
the code that we got inside our AppDelegate.
159

160
00:13:05,860 --> 00:13:11,290
So if you remember, this was the code that we copied and pasted from a new project that has the use code
160

161
00:13:11,290 --> 00:13:17,710
data checkmark checked, and what we get is a global variable called persistentContainer, and also a
161

162
00:13:17,710 --> 00:13:19,450
method called saveContext.
162

163
00:13:19,450 --> 00:13:25,240
So I'm just gonna get rid of all of this commenting that Apple has meticulously added, just so that our
163

164
00:13:25,320 --> 00:13:30,910
code is a little bit shorter and we can see it all on one page.
164

165
00:13:30,910 --> 00:13:36,850
I'm also going to delete the comments inside applicationWillTerminate and I'm also going to delete
165

166
00:13:37,150 --> 00:13:41,190
all of these methods excluding didFinishLaunchingOptions.
166

167
00:13:41,230 --> 00:13:42,700
So, now you should--
167

168
00:13:42,700 --> 00:13:48,010
So, now in your AppDelegate, you should have didFinishLaunchingWithOptions, as well as 
168

169
00:13:48,010 --> 00:13:53,590
applicationWillTerminate inside which you call self.saveContexts which is that method that Apple gave us
169

170
00:13:53,590 --> 00:13:54,460
for free.
170

171
00:13:54,580 --> 00:14:00,460
And we've also got this lazy variable code persistentContainer.
171

172
00:14:00,460 --> 00:14:04,210
So the first question you might have is, "I've never seen this keyword before.
172

173
00:14:04,210 --> 00:14:05,580
What does lazy do?
173

174
00:14:05,800 --> 00:14:11,200
Well, you know how there's some people who if they need to get to work at 9:00, they'll wake up at 6:00.
174

175
00:14:11,520 --> 00:14:17,800
You know, they'll spend half an hour doing yoga or some crazy stuff like that, and then do a whole bunch
175

176
00:14:17,800 --> 00:14:24,010
of prep work, eat a proper breakfast. And those people are not lazy. But then there's another category
176

177
00:14:24,010 --> 00:14:30,460
of people, myself included, which, you know, most people would categorize as lazy, and they're the sort of
177

178
00:14:30,460 --> 00:14:37,630
person who if you need to be out the door by 8:30, you're probably wake up around 8:20, and try
178

179
00:14:37,630 --> 00:14:43,550
to get everything done in 10 minutes, just so that you can have that extra hour of peaceful sleep.
179

180
00:14:43,570 --> 00:14:50,530
So this is kind of similar to what lazy variables are. When we create a variable that we declare is lazy,
180

181
00:14:50,830 --> 00:14:58,870
then it only gets loaded up with a value at the time point when it's needed, i.e., when you tried to use
181

182
00:14:59,140 --> 00:15:04,710
this thing called persistentContainer that is when all of this code is going to run, and it's going to
182

183
00:15:04,710 --> 00:15:06,830
have a value set.
183

184
00:15:06,840 --> 00:15:13,290
So whereas the lazy person gets a lying benefit, the lazy variable gets a memory benefit.
184

185
00:15:13,320 --> 00:15:19,940
So you're only occupying the memory when it's needed, rather than having everything set up beforehand.
185

186
00:15:19,980 --> 00:15:24,740
So inside this lazy variable, we're creating a NSPersistentContainer
186

187
00:15:25,290 --> 00:15:30,250
and this is basically where we are going to store all of our data.
187

188
00:15:30,390 --> 00:15:35,610
And even though it's called an NSPersistentContainer, which sounds kind of fancy, it's actually going
188

189
00:15:35,610 --> 00:15:37,530
to be a SQLite database.
189

190
00:15:37,530 --> 00:15:42,990
So for those you guys who have worked with databases, SQL, SQLite, then this is basically what
190

191
00:15:43,260 --> 00:15:45,300
the NSPersistentContainer is.
191

192
00:15:45,480 --> 00:15:51,450
Now, the reason why it's called persistentContainer, and not just your SQLite database, is because
192

193
00:15:51,450 --> 00:15:54,420
you can use different types of persistent containers.
193

194
00:15:54,450 --> 00:15:59,740
So for example, you can use XML, instead of SQLite, but that's a whole other topic.
194

195
00:15:59,760 --> 00:16:04,320
Just remember that your default persistent container is going to be a SQLite database.
195

196
00:16:04,320 --> 00:16:11,100
Now, we create a constant called container that sets up this new persistent container with the name of
196

197
00:16:11,130 --> 00:16:12,080
our DataModel,
197

198
00:16:12,180 --> 00:16:17,460
and these two have to match so that all the behind-the-scenes setup and the relationships gets created
198

199
00:16:17,460 --> 00:16:23,070
properly. And then we're going to load up this PersistentStore and we're going to log if there were
199

200
00:16:23,070 --> 00:16:28,260
any errors. But if there weren't any errors, then we're going to return the container that we loaded up
200

201
00:16:28,620 --> 00:16:34,620
and we're going to set it as the value of this lazy variable called persistentContainer. And we'll be
201

202
00:16:34,620 --> 00:16:41,910
have to access it inside other classes in order to persist and save our data into our SQLite database.
202

203
00:16:41,910 --> 00:16:47,310
Now, there's this other helper method called saveContext and this just provide some support to saving
203

204
00:16:47,310 --> 00:16:49,860
our data when our application gets terminated.
204

205
00:16:50,040 --> 00:16:56,070
But here, you see this thing called a context and we're going to look into the context a lot more later
205

206
00:16:56,070 --> 00:16:56,390
on.
206

207
00:16:56,460 --> 00:17:03,210
But essentially, the context is an area where you can change and update your data, so you can undo and
207

208
00:17:03,210 --> 00:17:09,690
redo until you're happy with your data, and then you can save the data that's in your contacts or your
208

209
00:17:09,690 --> 00:17:14,100
temporary area to the container which is for permanent storage.
209

210
00:17:14,100 --> 00:17:21,420
So if you remember our lessons on Git and gGitHub, the context is similar to that staging area, that temporary
210

211
00:17:21,420 --> 00:17:26,880
area where we can change things and update the things that we want to commit, and then only once we're
211

212
00:17:26,880 --> 00:17:31,200
ready, do we actually commit the data to source control.
212

213
00:17:31,320 --> 00:17:33,350
And in this case, it's exactly the same.
213

214
00:17:33,360 --> 00:17:39,060
So the two things that you need to understand from this code is that we create a new 
214

215
00:17:39,060 --> 00:17:45,180
NSPersistentContainer using our CoreData DataModel. And this persistentContainer is the database that we're going
215

216
00:17:45,180 --> 00:17:46,160
to be saving to
216

217
00:17:46,200 --> 00:17:52,440
and as a SQLITE database. The second thing is that we have this thing called a context which is
217

218
00:17:52,500 --> 00:17:59,040
what's called a scratch pad or a temporary area where you can update, change, delete your data until you're
218

219
00:17:59,040 --> 00:18:00,800
happy with the format.
219

220
00:18:00,990 --> 00:18:03,930
And then we basically commit it to permanent storage.
220

221
00:18:03,930 --> 00:18:07,860
So these concepts are core to understanding Core Data and how it works.
221

222
00:18:07,890 --> 00:18:10,580
So we're going to be revisiting it quite a few times.
222

223
00:18:10,590 --> 00:18:15,450
So if you don't get it right now, don't worry, because I'm gonna be repeating the concepts here a few more
223

224
00:18:15,450 --> 00:18:17,040
times until we get it.
224

225
00:18:17,040 --> 00:18:22,740
So, now that we've seen how we can configure and set up Core Data to be used inside our Todoey project,
225

226
00:18:23,100 --> 00:18:27,930
in the next lesson, we're going to look at the first letter of CRUD which is how do we create or how
226

227
00:18:27,930 --> 00:18:30,560
do we save our data using Core Data.
227

228
00:18:30,570 --> 00:18:33,060
So for all of that and more, see you on the next lesson.
