And with that we bring this course to a close!
Let’s take a quick recap of the entire course so you can see how far you’ve come!
At the beginning of this course, you knew how to save objects to the persistent store. With this course, you learned how to fetch them by defining and executing fetch requests, using the property wrapper FetchRequest and then using the type directly.
You learned how to sort the incoming data using sort descriptors and key paths. You also learned how to filter this data using predicates and compound predicates.
From there you learned how to add relationships to your entities by adding your rocket launches to lists. Core Data does a lot of the work for you by automatically fetching data associated with each relationship.
You learned about transient properties and how they can be used to house logic in your managed objects. This allowed you to utilize many features of Core Data like undo, redo and validation without persisting every single data point.
Then you learned about some new features of Core Data centered around asynchronous Swift. In addition to using Batch Operations to store data, you took advantage of async/await calls to work with a background context that saved data to the persistent store in the background.
Next you spent some time learning how Core Data handles deletions. Deletion rules allow you to maintain your object graph in a very precise manner after destructive actions have been taken.
Finally you looked at how Core Data can help you optimize your app by storing large files in external storage and only loading them when needed.
Even after both the Core Data: Fundamentals course, and this one, you’ve only started to learn about Core Data and all it can do! Luckily, since Core Data is implemented using flexible design patterns much of the details of the framework are tucked away and optional so you don’t have to think about them at all.
Start incorporating Core Data into your projects, even if you’re not actually storing user data. There’s lots of ways Core Data can be helpful like acting as a local cache while the app fetches new data from the server for example.
When you’re comfortable with the basics dive into intermediate and advanced Core Data topics, which you can find with your subscription. See you next time!