My hope is that this series has taught you that Core Data isn't as difficult as many developers believe it to be. Core Data isn't complex once you understand how the various pieces of the framework fit together.
Core Data Isn't Scary
It's true that the Core Data stack looks scary when you first encounter it in the wild, but once you understand how the managed object context, the managed object model, and the persistent store coordinator work together, it isn't that difficult.
Many developers make mistakes by not understanding or taking the time to learn the basics. And that's part of the reason some people don't want to work with the framework.
I truly love working with Core Data because I like how the framework is engineered and I know that it's earned its stripes over the more than ten years it's been around. The automatic code generation introduced in Xcode 8 and the nice additions the Swift language brings make the framework even better.
Start Using Core Data
What's the next step for you? Simple. Start using the framework in your projects. Remember to respect the rules we learned in this series, especially the concurrency rules. But don't overcomplicate your application if it isn't necessary.
That said, keep in mind how the users of your application plan to use your application. Take Notes as an example. We've used the application with a handful of notes, but some users may have hundreds or thousands of notes. How will that impact performance? Core Data is a robust persistence framework and it's a great fit for many applications that require a persistence solution.
Testing
Remember to test the migrations of your application. This is an often overlooked problem. Let me illustrate this with an example. Imagine a user restores a backup of their device and installs an older version of your application. After restoring the backup, they update your application to the latest version, a version with a data model that differs from the old restored version. This means the application needs to perform several migrations. And if the user has many records stored in the persistent store, this can take several seconds if not longer.
Even if this is an edge case, you need to understand that a problem may result in data loss. Depending on the type of application, this can be a nightmare for the user. You need to prevent data loss at all cost. The user trusts you with their data. Don't take that responsibility lightly.
Libraries
I also want to say a few words about third party libraries for Core Data. My advise is to avoid them if possible. Core Data is a first party framework with a great API. Instead of using a third party library, why don't you write a small library yourself with a handful of convenience methods. That goes a long way.
If you know and understand Core Data, then a wrapper around the framework is unnecessary. Give it a try before choosing for more complexity and one more dependency. Don't you agree that the code we wrote in this series isn't complex? And this has nothing to do with the application. Core Data doesn't need to be complicated.
Data Model
In this series, I emphasized how important it is to take the time to create the data model of your application. The data model can and will change over time, but you only get a first try once.
The moment the application is in the hands of your users, it's a nightmare to make drastic changes without running into problems. This isn't a Core Data problem. Most persistence solutions face these issues. That's inherent to data persistence.
Take your time to plan ahead. Keep it as simple as possible and only add complexity if necessary.
Continue Learning
The Core Data framework has a lot more to offer than what you learned in this series. It's a very powerful and flexible framework. It's true that most of the more advanced features are used less frequently, but they can sometimes save you a lot of time and frustration.
I encourage you to continue exploring the framework. If you find yourself wrestling with Core Data, then there's probably a better solution to achieve your goal.
We covered a lot of ground in this series. It's now time to use what you've learned in your projects.