Skip to content

bartjacobs/SettingUpTheCoreDataStackWithNSPersistentContainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Author: Bart Jacobs

In the previous tutorial, you learned about the Core Data stack and the classes involved. In this tutorial, we take a close look at Xcode's template for Core Data applications.

Setting Up the Project

Open Xcode and select New > Project... from the File menu. Choose the Single View Application template from the iOS > Application section and click Next.

Setting Up the Core Data Stack With NSPersistentContainer | Setting Up the Project

Name the application Core Data, enter an organization name and identifier, and set Language to Swift. Check the Use Core Data checkbox to make sure Xcode adds the necessary files and code for working with Core Data.

Setting Up the Core Data Stack With NSPersistentContainer | Setting Up the Project

Exploring Files and Folders

The project includes a file that may be new to you, Core_Data.xcdatamodeld. This is the data model I talked about in the previous tutorial. Select the file to take a quick peek at its contents.

Setting Up the Core Data Stack With NSPersistentContainer | Exploring Files and Folders

Because the data model doesn't contain any entities yet, there isn't much to see. We take a closer look at the data model and the data model editor in Mastering Core Data With Swift 3.

Setting Up the Core Data Stack With NSPersistentContainer | Exploring Files and Folders

Read this article on Cocoacasts.

Releases

No releases published

Packages

No packages published

Languages