Sample Code

Synchronizing a Local Store to the Cloud

Share data between a user’s devices using Core Data with CloudKit.



Configure the Sample Code Project

Before you run the sample code project in Xcode:

  1. Set your bundle identifier. In the project settings, under General, in the Identity section, set the Bundle Identifier to your reverse domain name followed by the project name.

  2. Set your development team. In the project settings, under Signing & Capabilities, select your development team from the dropdown list.

See Also

CloudKit Mirroring

Mirroring a Core Data Store with CloudKit

Back user interfaces with a local replica of a CloudKit private database.

class NSPersistentCloudKitContainer

A container that encapsulates the Core Data stack in your app and mirrors select persistent stores to a CloudKit private database.

class NSPersistentCloudKitContainerOptions

An object that customizes how a store description aligns with a CloudKit database.