Skip to main content

Example app

There are example projects for Core Data, Realm and RealmSwift.

To run the example project, clone the repo, and run pod install from the Example directory first. Because the sample project uses CloudKit you will need to use your Apple Developer account to create an app identifier and iCloud container. Then enable CloudKit for the app by going to your target Capabilities page and make sure the right container is accessible by the app. In AppDelegate.swift replace the sample container name with yours:

lazy var synchronizer =     CloudKitSynchronizer.privateSynchronizer(containerName: "your-iCloud-container-name",                           managedObjectContext: self.coreDataStack.managedObjectContext)

You should then be able to run the sample app.

Other resources#

Here's another Swift version of the Core Data example project, courtesy of LeJeko.

There is also a video tutorial courtesy of http://www.spotlessicode.com.