Core Data: Fundamentals

Jul 19 2022 · Swift 5.5, iOS 15.4, Xcode 13.3.1

Part 2: Saving Launches

13. Conclusion

Episode complete

About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 12. Inserting Data Into the Context

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Notes: 13. Conclusion

Where to go from here: Look out for the 2nd part of this course — Core Data: Beyond the Basics — available very soon!

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

As you can see, Core Data is a really powerful framework but it is only as complicated as you need it to be and it does an excellent job of hiding all its internals from you. This means that you don't need to understand finer details of working with databases and can start using it immediately. Let's recap what you've learned in this course. You learned the different parts of the Core Data Stack and how to initialize that stack in the Persistence.swift file. You learned how to use the Core Data model editor to define entities to model your relationships. You learned how to define attributes on these entities that mapped data points you're trying to represent in your model. Once you flushed out the entities, you know how to create Ennis Managed Objects subclasses to represent them in code. You learned how to do this both automatically and let Xcode and Core Data generate the code, but also how to write it yourself. I find the auto generation the easiest to work with but you can always drop to custom classes or extensions when you need it. Using these subclasses, you learned how to create instances of the entity and to insert them into the context. Once inserted, you also learned how to save it so that the changes are persisted to the data store. That's just one half of the data flow with Core Data though. You also need to be able to fetch data from the database, possibly asynchronously and display it in your app. You can find information about that and more in part two of this course, Core Data Beyond the Basics. when you're ready to blast off, I'll see you there.