Sample Code

Synchronizing a Local Store to the Cloud

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

Download

Overview

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.

Beta
class NSPersistentCloudKitContainerOptions

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

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software