Core Data Prepare

To use CoreData in iOS, we need to understand how to use it.
Also, we need understand Database.
But we don’t need understand sqlite, which is integrated into iOS.

Core Data Basic is in iOS Developer website.

This is first overview for Core Data.

Steps

  • Prepare Structure(Database data structure)
  • Prepare CoreData file(.xcdtamodeld)
  • Create Data Model using XCode
  • Prepare CoreData access objects(NSManagedObjectContext, NSManagedObjectModel, NSPersistentStoreCoordinator)
  • Create Data Access Object to retrieve data from CoreData

I’ll explain these steps with my Application case(Colomemo).
Also, I separate steps of each entry.

Prepare Structure(Database data structure)

This is first step to use CoreData.
This step is almost same as other applications. Web, mobile, desktop, etc…
Create database mock structure.
I’ll skip this part.