
Learning Xcode 8
By :

In the last section, we learned about how to start using Core Data in a project that already has the feature enabled from the beginning. However, our Snippets
project was started without Core Data enabled so, before we can continue, we're going to have to prepare our project for use with Core Data. There are two things we need to do: set up the managed context
and the rest of the Core Data stack in our AppDelegate.swift
file, and then create the data model for Snippets using the editor we just covered. Before we get started, open your Snippets
Xcode project (or use my final version from Chapter 8, Exploring Common iOS Frameworks), and import the CoreData
framework.
So far, we've only looked at how to create a data model in Core Data. Now, we need to set up the code that will let us load, manipulate, and save our data. The objects that help us to do this are referred to as the Core Data stack
. This is composed of three pieces...