Summary
This chapter described how to set up a new project to use Core Data and how to set up all the Core Data environment pieces. The chapter detailed how to create a managed object model, including how to add a new entity, add attributes to an entity, and set up relationships between entities. It also described why an NSManagedObject subclass is useful and how to create one.
This chapter explained how to set up some initial data for the project, and demonstrated how to insert new managed objects. Alternative techniques for initial data setup were discussed.
This chapter then detailed how to create a fetch request to get saved managed objects, and how to fetch individual managed objects using an objectID. It described how to display data from managed objects in the user interface of an app. It explained how to use predicates to fetch managed objects that match specific criteria.
This chapter introduced the fetched results controller, a powerful tool for integrating Core Data with the UITableView; described how to set up a UITableView with a fetched results controller; and explained how to set up a fetched results controller delegate to automatically update a table view from Core Data changes.
Lastly, this chapter explained how to add, edit, and delete managed objects, and how to save changes or roll back unwanted changes.
With all of these tools, you should now have a good foundation for using Core Data effectively in your apps.