Instance Property

sharedCloudDatabase

The database containing shared user data.

Declaration

@property(nonatomic, readonly) CKDatabase *sharedCloudDatabase;

Discussion

The database in this property is available only if the device has an active iCloud account. Permissions on the database are limited to the user based on the permissions of the enclosing CKShare object (representing the record that has been shared). The current user does not own the content in the shared database and is allowed to read and write that content only if that permission has been granted in the CKShare. Data in the shared database is not visible in the developer portal or to any user who has not been granted access.

Data stored in the shared database does not count against the storage quota of the current user’s iCloud account.

If there is no active iCloud account on the user’s device, this property still returns a valid database object, but attempts to use the object will return errors. To determine whether the device has an active iCloud account use the accountStatusWithCompletionHandler: method.

See Also

Getting the Public and Private Databases

privateCloudDatabase

The database containing the user’s private data.

publicCloudDatabase

The database containing the data shared by all users.

- databaseWithDatabaseScope:

Retrieves the database with the appropriate scope.