Platforms to show: All Mac Windows Linux Cross-Platform

Back to CKShareMBS class.

CKShareMBS.addParticipant(participant as CKShareParticipantMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Adds a participant to this share.

participant: The participant to be added to this share.

If a participant with a matching userIdentity already exists in this share, that existing participant’s properties are updated; no new participant is added.

To modify the list of participants, a share must have publicPermission set to CKShareParticipantPermissionNone. You cannot mix and match private users and public users in the same share. Only certain participant types may be added via this API; see CKShareParticipantMBS.

CKShareMBS.Constructor(rootRecord as CKRecordMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes and returns a share object.

When saving a newly created CKShare, you must save the share and its rootRecord in the same CKModifyRecordsOperationMBS batch.

See also:

CKShareMBS.Constructor(rootRecord as CKRecordMBS, shareID as CKRecordIDMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes and returns a share object.

rootRecord: The record being shared.
shareID: The CKRecordID associated with this share.

When saving a newly created CKShare, save the share and its rootRecord in the same CKModifyRecordsOperationMBS batch.

See also:

CKShareMBS.Constructor(zoneID as CKRecordZoneIDMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 21.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a new share for the specified record zone.

ZoneID: The ID of the record zone to share.

A shared record zone must have the CKRecordZoneCapabilityZoneWideSharing capability. Custom record zones that you create in the user’s private database have this capability by default. A record zone, and the records it contains, can take part in only a single share.

After accepting a share invite, CloudKit adds the records of the shared record zone to a new zone in the participant’s shared database. Use CKFetchDatabaseChangesOperationMBS to fetch the ID of the new record zone. Then configure CKFetchRecordZoneChangesOperationMBS with that record zone ID and execute the operation to fetch the records.
If you use CKFetchShareMetadataOperationMBS to fetch the metadata for a shared record zone, the operation ignores the shouldFetchRootRecord and rootRecordDesiredKeys properties because, unlike a shared record hierarchy, a record zone doesn’t have a nominated root record.

Available in macOS 12 or later.

See also:

CKShareMBS.participants as CKShareParticipantMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
An array containing metadata objects for all participants in this share.

The participants array contains all participants on the share that the current user has permissions to see. At a minimum, this array includes the owner and the current user.

CKShareMBS.removeParticipant(participant as CKShareParticipantMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes a participant from the share.

participant: The participant to be removed from this share.

To modify the list of participants, a share must have publicPermission set to CKShareParticipantPermissionNone. You cannot mix and match private users and public users in the same share. Only certain participant types may be added via this API; see CKShareParticipantMBS.

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...