Instance Property

publicCloudDatabase

The database containing the data shared by all users.

Declaration

var publicCloudDatabase: CKDatabase { get }

Discussion

The database in this property is available regardless of whether the user’s device has an active iCloud account. The contents of the public database are readable by all users of the app, and users have write access to the records (and other data objects) they create. Data in the public database is also visible in the developer portal, where you can assign roles to users and restrict access as needed.

Data stored in the public database counts against your app’s iCloud storage quota and not against the quota of any single user.

See Also

Getting the Public and Private Databases

var privateCloudDatabase: CKDatabase

The database containing the user’s private data.

var sharedCloudDatabase: CKDatabase

The database containing shared user data.

func database(with: CKDatabase.Scope) -> CKDatabase

Retrieves the database with the appropriate scope.

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