cloudkit

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package cloudkit provides purego-based Go bindings for the macOS CloudKit framework.

Apple documentation: https://developer.apple.com/documentation/cloudkit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CKAccountChangedNotification

func CKAccountChangedNotification() *foundation.NSString

A notification that a container posts when the status of an iCloud account changes. Create an instance of “CKContainer“ to receive this notification. The container posts the notification using an arbitrary queue. Use the “CKContainer/accountStatus(completionHandler:)“ method to obtain the account's status.

func CKCurrentUserDefaultName

func CKCurrentUserDefaultName() *foundation.NSString

A constant that provides the current user's default name.

func CKErrorDomain

func CKErrorDomain() *foundation.NSString

The error domain for CloudKit errors.

func CKErrorRetryAfterKey

func CKErrorRetryAfterKey() *foundation.NSString

The key to retrieve the number of seconds to wait before you retry a request. An <doc://com.apple.documentation/documentation/foundation/nsnumber> that contains the number of seconds until you can retry a request. CloudKit adds this key to the error's <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary when the error code is “CKError/Code/serviceUnavailable“ or “CKError/Code/requestRateLimited“.

func CKErrorUserDidResetEncryptedDataKey

func CKErrorUserDidResetEncryptedDataKey() *foundation.NSString

The key that determines whether CloudKit deletes a record zone because of a user action. An <doc://com.apple.documentation/documentation/foundation/nsnumber> that represents a Boolean value you use to determine whether a user action causes CloudKit to delete a record zone. CloudKit adds this key to the error's `userInfo` dictionary when the error code is “CKError/Code/zoneNotFound“.

func CKOwnerDefaultName

func CKOwnerDefaultName() *foundation.NSString

A constant that provides the default owner's name. Deprecated: since macOS 10.12.

func CKPartialErrorsByItemIDKey

func CKPartialErrorsByItemIDKey() *foundation.NSString

The key to retrieve partial errors. The value of this key is a dictionary that maps an item ID to an error. The type of each ID depends on where the error occurs. For example, if you receive a partial error when modifying a record, the ID is an instance of “CKRecord/ID“ that corresponds to the record that CloudKit can't modify.

func CKQueryOperationMaximumResults

func CKQueryOperationMaximumResults() uint

A constant value that represents the maximum number of results CloudKit retrieves. The value of this constant doesn't correspond to the actual number of records. CloudKit dynamically determines the actual number according to various conditions at runtime. This constant is the “CKQueryOperation/resultsLimit“ property's default value.

func CKRecordChangedErrorAncestorRecordKey

func CKRecordChangedErrorAncestorRecordKey() *foundation.NSString

The key to retrieve the original version of the record.

func CKRecordChangedErrorClientRecordKey

func CKRecordChangedErrorClientRecordKey() *foundation.NSString

The key to retrieve the local version of the record.

func CKRecordChangedErrorServerRecordKey

func CKRecordChangedErrorServerRecordKey() *foundation.NSString

The key to retrieve the server's version of the record.

func CKRecordCreationDateKey

func CKRecordCreationDateKey() *foundation.NSString

A key constant that a record uses for its CKRecord.creationDate.

func CKRecordCreatorUserRecordIDKey

func CKRecordCreatorUserRecordIDKey() *foundation.NSString

A key constant that a record uses for its CKRecord.creatorUserRecordID.

func CKRecordLastModifiedUserRecordIDKey

func CKRecordLastModifiedUserRecordIDKey() *foundation.NSString

A key constant that a record uses for its CKRecord.lastModifiedUserRecordID.

func CKRecordModificationDateKey

func CKRecordModificationDateKey() *foundation.NSString

A key constant that a record uses for its CKRecord.modificationDate.

func CKRecordNameZoneWideShare

func CKRecordNameZoneWideShare() *foundation.NSString

The name of a share record that manages a shared record zone. When you create an instance of “CKShare“ for sharing a record zone, CloudKit automatically assigns this constant as the “CKRecord/ID/recordName“ element of the share record's “CKRecord/recordID“. After you save the share record to iCloud, you can fetch it by reconstructing the record ID using this constant, as the following example shows: ```swift func fetchShare( forZone zone: CKRecordZone, completion: @escaping (Result<CKShare, any Error>) -> Void ) { let database = CKContainer.default().privateCloudDatabase // Use the 'CKRecordNameZoneWideShare' constant to create the record ID. let recordID = CKRecord.ID(recordName: CKRecordNameZoneWideShare, zoneID: zone.zoneID) // Fetch the share record from the specified record zone. database.fetch(withRecordID: recordID) { share, error in if let error = error { // If the fetch fails, inform the caller. completion(.failure(error)) } else if let share = share as? CKShare { // Otherwise, pass the fetched share record to the // completion handler. completion(.success(share)) } else { fatalError("Unable to fetch record with ID: \(recordID)") } } } ```

func CKRecordParentKey

func CKRecordParentKey() *foundation.NSString

The key constant that a record uses for its CKRecord.parent.

func CKRecordRecordIDKey

func CKRecordRecordIDKey() *foundation.NSString

A key constant that a record uses for its CKRecord.recordID.

func CKRecordShareKey

func CKRecordShareKey() *foundation.NSString

The key constant that a record uses for its CKRecord.share.

func CKRecordTypeShare

func CKRecordTypeShare() *foundation.NSString

The system type that identifies a share record.

func CKRecordTypeUserRecord

func CKRecordTypeUserRecord() *foundation.NSString

The system type that identifies a user record. CloudKit automatically creates a user record for each unique user of the app. User records are empty initially. You can add data to the user record using the same rules that apply for all records. Specifically, you must specify a consistent type of data for a particular field name in all user records. However, you can't create new user records using this record type and you can't query for records of this type. To locate user records, you must know the ID of the user record or use the methods that CKContainer provides to discover user records.

func CKRecordZoneDefaultName

func CKRecordZoneDefaultName() *foundation.NSString

The default record zone's name. Use this value when you need to refer to the default zone by name, such as when creating a zone ID. The default zone has no special capabilities.

func CKShareThumbnailImageDataKey

func CKShareThumbnailImageDataKey() *foundation.NSString

The system field key for the share's thumbnail image data. This predefined key is part of the `CKRecordTypeShare` schema. It is used by the out of process UI flow to send a share, and as part of the share acceptance flow. It is an optional value on a `CKShare` record.

func CKShareTitleKey

func CKShareTitleKey() *foundation.NSString

The system field key for the share's title. This predefined key is part of the `CKRecordTypeShare` schema. The out of process UI flow uses this key to send a share, and as part of the share acceptance flow. It is an optional value on a `CKShare` record.

func CKShareTypeKey

func CKShareTypeKey() *foundation.NSString

The system field key for the share's type. This predefined key is part of the `CKRecordTypeShare` schema. It is used by the out of process UI flow to send a share, and as part of the share acceptance flow. It is an optional value on a `CKShare` record.

func CKUserIdentityLookupInfoLookupInfosWithEmails

func CKUserIdentityLookupInfoLookupInfosWithEmails(emails *foundation.NSArray[*foundation.NSString]) *foundation.NSArray[*CKUserIdentityLookupInfo]

Returns an array of lookup infos for the specified email addresses. - Parameters: - emails: The email addresses for looking up the user identities. Use the values that this method returns in an “CKDiscoverUserIdentitiesOperation“ operation or an “CKFetchShareParticipantsOperation“ operation to retrieve the corresponding user identities.

func CKUserIdentityLookupInfoLookupInfosWithPhoneNumbers

func CKUserIdentityLookupInfoLookupInfosWithPhoneNumbers(phoneNumbers *foundation.NSArray[*foundation.NSString]) *foundation.NSArray[*CKUserIdentityLookupInfo]

Returns an array of lookup infos for the specified phone numbers. - Parameters: - phoneNumbers: The phone numbers for looking up the user identities. Use the values that this method returns in an “CKDiscoverUserIdentitiesOperation“ operation or an “CKFetchShareParticipantsOperation“ operation to retrieve the corresponding user identities.

func CKUserIdentityLookupInfoLookupInfosWithRecordIDs

func CKUserIdentityLookupInfoLookupInfosWithRecordIDs(recordIDs *foundation.NSArray[*CKRecordID]) *foundation.NSArray[*CKUserIdentityLookupInfo]

Returns an array of lookup infos for the specified user record IDs. - Parameters: - recordIDs: The user record IDs for looking up the user identities. Use the values that this method returns in an “CKDiscoverUserIdentitiesOperation“ operation or an “CKFetchShareParticipantsOperation“ operation to retrieve the corresponding user identities.

Types

type Acl_entry_id_t

type Acl_entry_id_t int64
const (
	ACL_FIRST_ENTRY Acl_entry_id_t = 0
	ACL_NEXT_ENTRY  Acl_entry_id_t = -1
	ACL_LAST_ENTRY  Acl_entry_id_t = -2
)

func (Acl_entry_id_t) String

func (e Acl_entry_id_t) String() string

type Acl_flag_t

type Acl_flag_t int64
const (
	ACL_FLAG_DEFER_INHERIT      Acl_flag_t = 1
	ACL_FLAG_NO_INHERIT         Acl_flag_t = 131072
	ACL_ENTRY_INHERITED         Acl_flag_t = 16
	ACL_ENTRY_FILE_INHERIT      Acl_flag_t = 32
	ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64
	ACL_ENTRY_LIMIT_INHERIT     Acl_flag_t = 128
	ACL_ENTRY_ONLY_INHERIT      Acl_flag_t = 256
)

func (Acl_flag_t) String

func (e Acl_flag_t) String() string

type Acl_perm_t

type Acl_perm_t int64
const (
	ACL_READ_DATA           Acl_perm_t = 2
	ACL_LIST_DIRECTORY      Acl_perm_t = 2
	ACL_WRITE_DATA          Acl_perm_t = 4
	ACL_ADD_FILE            Acl_perm_t = 4
	ACL_EXECUTE             Acl_perm_t = 8
	ACL_SEARCH              Acl_perm_t = 8
	ACL_DELETE              Acl_perm_t = 16
	ACL_APPEND_DATA         Acl_perm_t = 32
	ACL_ADD_SUBDIRECTORY    Acl_perm_t = 32
	ACL_DELETE_CHILD        Acl_perm_t = 64
	ACL_READ_ATTRIBUTES     Acl_perm_t = 128
	ACL_WRITE_ATTRIBUTES    Acl_perm_t = 256
	ACL_READ_EXTATTRIBUTES  Acl_perm_t = 512
	ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024
	ACL_READ_SECURITY       Acl_perm_t = 2048
	ACL_WRITE_SECURITY      Acl_perm_t = 4096
	ACL_CHANGE_OWNER        Acl_perm_t = 8192
	ACL_SYNCHRONIZE         Acl_perm_t = 1048576
)

func (Acl_perm_t) String

func (e Acl_perm_t) String() string

type Acl_tag_t

type Acl_tag_t int64
const (
	ACL_UNDEFINED_TAG  Acl_tag_t = 0
	ACL_EXTENDED_ALLOW Acl_tag_t = 1
	ACL_EXTENDED_DENY  Acl_tag_t = 2
)

func (Acl_tag_t) String

func (e Acl_tag_t) String() string

type Acl_type_t

type Acl_type_t int64
const (
	ACL_TYPE_EXTENDED Acl_type_t = 256
	ACL_TYPE_ACCESS   Acl_type_t = 0
	ACL_TYPE_DEFAULT  Acl_type_t = 1
	ACL_TYPE_AFS      Acl_type_t = 2
	ACL_TYPE_CODA     Acl_type_t = 3
	ACL_TYPE_NTFS     Acl_type_t = 4
	ACL_TYPE_NWFS     Acl_type_t = 5
)

func (Acl_type_t) String

func (e Acl_type_t) String() string

type CKAcceptSharesOperation

type CKAcceptSharesOperation struct {
	CKOperation
}

An operation that confirms a user’s participation in a share.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckacceptsharesoperation

func CKAcceptSharesOperationFromID

func CKAcceptSharesOperationFromID(id objc.ID) *CKAcceptSharesOperation

func (*CKAcceptSharesOperation) AcceptSharesCompletionBlock

func (o *CKAcceptSharesOperation) AcceptSharesCompletionBlock() objc.Block

The closure to execute when the operation finishes. The closure returns no value and takes the following parameter: - An error that contains information about a problem, or `nil` if CloudKit successfully processes the shares. The operation executes this closure only once. The closure executes on a background queue, so any tasks that require access to the main queue must dispatch accordingly. The closure reports an error of type “CKError/Code/partialFailure“ when it can't process some of the shares. The `userInfo` dictionary of the error contains a “CKPartialErrorsByItemIDKey“ key that has a dictionary as its value. The keys of the dictionary are share URLs that CloudKit can't process, and the corresponding values are errors that contain information about the failures. Set this property's value before you execute the operation or submit it to a queue.

func (*CKAcceptSharesOperation) Init

Creates an operation for accepting shares.

func (*CKAcceptSharesOperation) InitWithShareMetadatas

func (o *CKAcceptSharesOperation) InitWithShareMetadatas(shareMetadatas *foundation.NSArray[*CKShareMetadata]) *CKAcceptSharesOperation

Creates an operation for accepting the specified shares.

func (*CKAcceptSharesOperation) PerShareCompletionBlock

func (o *CKAcceptSharesOperation) PerShareCompletionBlock() objc.Block

The block to execute as CloudKit processes individual shares. The closure returns no value and takes the following parameters: - The share metadata to process. - The share, or `nil` if CloudKit can't process the share metadata. - If CloudKit can't process the share metadata, this parameter provides information about the failure; otherwise, it's `nil`. The operation executes this closure once for each element in the “CKAcceptSharesOperation/shareMetadatas“ property. Each time the closure executes, it executes serially with respect to the other closures of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKAcceptSharesOperation) SetAcceptSharesCompletionBlock

func (o *CKAcceptSharesOperation) SetAcceptSharesCompletionBlock(acceptSharesCompletionBlock func(unsafe.Pointer))

func (*CKAcceptSharesOperation) SetPerShareCompletionBlock

func (o *CKAcceptSharesOperation) SetPerShareCompletionBlock(perShareCompletionBlock func(*CKShareMetadata, *CKShare, unsafe.Pointer))

func (*CKAcceptSharesOperation) SetShareMetadatas

func (o *CKAcceptSharesOperation) SetShareMetadatas(shareMetadatas *foundation.NSArray[*CKShareMetadata])

func (*CKAcceptSharesOperation) ShareMetadatas

The share metadatas to process. Use this property to view or change the metadata of the shares you want to process. If you intend to specify or change the value of this property, do so before you execute the operation or submit it to a queue.

type CKAccountStatus

type CKAccountStatus int64

Constants that indicate the availability of the user’s iCloud account.

const (
	// CloudKit can’t determine the status of the user’s iCloud account.
	CKAccountStatusCouldNotDetermine CKAccountStatus = 0
	// The user’s iCloud account is available.
	CKAccountStatusAvailable CKAccountStatus = 1
	// The system denies access to the user’s iCloud account.
	CKAccountStatusRestricted CKAccountStatus = 2
	// The device doesn’t have an iCloud account.
	CKAccountStatusNoAccount CKAccountStatus = 3
	// The user’s iCloud account is temporarily unavailable.
	CKAccountStatusTemporarilyUnavailable CKAccountStatus = 4
)

func (CKAccountStatus) String

func (e CKAccountStatus) String() string

type CKAllowedSharingOptions

type CKAllowedSharingOptions struct {
	foundation.NSObject
}

An object that controls participant access and permission options.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckallowedsharingoptions

func CKAllowedSharingOptionsFromID

func CKAllowedSharingOptionsFromID(id objc.ID) *CKAllowedSharingOptions

func CKAllowedSharingOptionsStandardOptions

func CKAllowedSharingOptionsStandardOptions() *CKAllowedSharingOptions

An object set to the most permissive sharing options. The `standardOptions` has “CKAllowedSharingOptions/allowedParticipantPermissionOptions“ set to “CKSharingParticipantPermissionOption/any“ and “CKAllowedSharingOptions/allowedParticipantAccessOptions“ set to “CKSharingParticipantAccessOption/any“.

func (*CKAllowedSharingOptions) AllowedParticipantAccessOptions

func (o *CKAllowedSharingOptions) AllowedParticipantAccessOptions() CKSharingParticipantAccessOption

The permission option the system uses to control whether a user can share publicly or privately.

func (*CKAllowedSharingOptions) AllowedParticipantPermissionOptions

func (o *CKAllowedSharingOptions) AllowedParticipantPermissionOptions() CKSharingParticipantPermissionOption

The permission option the system uses to control whether a user can grant read-only or write access.

func (*CKAllowedSharingOptions) AllowsAccessRequests

func (o *CKAllowedSharingOptions) AllowsAccessRequests() bool

Default value is NO. If set, the system sharing UI allows the user to configure whether participants can request access to the share.

func (*CKAllowedSharingOptions) AllowsParticipantsToInviteOthers

func (o *CKAllowedSharingOptions) AllowsParticipantsToInviteOthers() bool

Default value is NO. If set, the system sharing UI allows the user to choose whether added participants can invite others to the share. CloudKit returns shares with “CKShare/ParticipantRole/administrator-enum.case“ participants as read-only to devices running OS versions prior to this role being introduced. CloudKit returns administrator participants on such read-only shares as “CKShare/ParticipantRole/privateUser-enum.case“.

func (*CKAllowedSharingOptions) InitWithAllowedParticipantPermissionOptionsAllowedParticipantAccessOptions

func (o *CKAllowedSharingOptions) InitWithAllowedParticipantPermissionOptionsAllowedParticipantAccessOptions(allowedParticipantPermissionOptions CKSharingParticipantPermissionOption, allowedParticipantAccessOptions CKSharingParticipantAccessOption) *CKAllowedSharingOptions

Creates and initializes an allowed sharing options object.

func (*CKAllowedSharingOptions) SetAllowedParticipantAccessOptions

func (o *CKAllowedSharingOptions) SetAllowedParticipantAccessOptions(allowedParticipantAccessOptions CKSharingParticipantAccessOption)

func (*CKAllowedSharingOptions) SetAllowedParticipantPermissionOptions

func (o *CKAllowedSharingOptions) SetAllowedParticipantPermissionOptions(allowedParticipantPermissionOptions CKSharingParticipantPermissionOption)

func (*CKAllowedSharingOptions) SetAllowsAccessRequests

func (o *CKAllowedSharingOptions) SetAllowsAccessRequests(allowsAccessRequests bool)

func (*CKAllowedSharingOptions) SetAllowsParticipantsToInviteOthers

func (o *CKAllowedSharingOptions) SetAllowsParticipantsToInviteOthers(allowsParticipantsToInviteOthers bool)

type CKApplicationPermissionStatus deprecated

type CKApplicationPermissionStatus int64

Deprecated: No longer supported. Please see Sharing CloudKit Data with Other iCloud Users.

const (
	// The app is yet to request the permission.
	CKApplicationPermissionStatusInitialState CKApplicationPermissionStatus = 0
	// An error that occurs while processing the permission request.
	CKApplicationPermissionStatusCouldNotComplete CKApplicationPermissionStatus = 1
	// The user denies the permission.
	CKApplicationPermissionStatusDenied CKApplicationPermissionStatus = 2
	// The user grants the permission.
	CKApplicationPermissionStatusGranted CKApplicationPermissionStatus = 3
)

func (CKApplicationPermissionStatus) String

type CKApplicationPermissions

type CKApplicationPermissions uint64
const (
	// The user is discoverable using their email address.
	CKApplicationPermissionUserDiscoverability CKApplicationPermissions = 1
)

func (CKApplicationPermissions) String

func (e CKApplicationPermissions) String() string

type CKAsset

type CKAsset struct {
	foundation.NSObject
}

An external file that belongs to a record.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckasset

func CKAssetFromID

func CKAssetFromID(id objc.ID) *CKAsset

func (*CKAsset) FileURL

func (o *CKAsset) FileURL() *foundation.NSURL

func (*CKAsset) InitWithFileURL

func (o *CKAsset) InitWithFileURL(fileURL *foundation.NSURL) *CKAsset

Creates an asset that references a file.

type CKContainer

type CKContainer struct {
	foundation.NSObject
}

A conduit to your app’s databases.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckcontainer

func CKContainerContainerWithIdentifier

func CKContainerContainerWithIdentifier(containerIdentifier *foundation.NSString) *CKContainer

Creates a container for the specified identifier.

func CKContainerDefaultContainer

func CKContainerDefaultContainer() *CKContainer

Returns the app’s default container.

func CKContainerFromID

func CKContainerFromID(id objc.ID) *CKContainer

func (*CKContainer) AcceptShareMetadataCompletionHandler

func (o *CKContainer) AcceptShareMetadataCompletionHandler(metadata *CKShareMetadata, completionHandler func(*CKShare, unsafe.Pointer))

Accepts the specified share metadata.

func (*CKContainer) AccountStatusWithCompletionHandler

func (o *CKContainer) AccountStatusWithCompletionHandler(completionHandler func(CKAccountStatus, unsafe.Pointer))

Determines whether the system can access the user’s iCloud account.

func (*CKContainer) AddOperation

func (o *CKContainer) AddOperation(operation *CKOperation)

Adds an operation to the container’s queue.

func (*CKContainer) ContainerIdentifier

func (o *CKContainer) ContainerIdentifier() *foundation.NSString

The container's unique identifier. Use this property's value to distinguish different containers in your app.

func (*CKContainer) DatabaseWithDatabaseScope

func (o *CKContainer) DatabaseWithDatabaseScope(databaseScope CKDatabaseScope) *CKDatabase

Returns the database with the specified scope.

func (*CKContainer) DiscoverAllIdentitiesWithCompletionHandler

func (o *CKContainer) DiscoverAllIdentitiesWithCompletionHandler(completionHandler func(*foundation.NSArray[*CKUserIdentity], unsafe.Pointer))

Fetches all user identities that match entries in the user’s Contacts. Deprecated: No longer supported. Please see Sharing CloudKit Data with Other iCloud Users.

func (*CKContainer) DiscoverUserIdentityWithEmailAddressCompletionHandler

func (o *CKContainer) DiscoverUserIdentityWithEmailAddressCompletionHandler(email *foundation.NSString, completionHandler func(unsafe.Pointer, unsafe.Pointer))

Fetches the user identity for the specified email address. Deprecated: No longer supported. Please see Sharing CloudKit Data with Other iCloud Users.

func (*CKContainer) DiscoverUserIdentityWithPhoneNumberCompletionHandler

func (o *CKContainer) DiscoverUserIdentityWithPhoneNumberCompletionHandler(phoneNumber *foundation.NSString, completionHandler func(unsafe.Pointer, unsafe.Pointer))

Fetches the user identity for the specified phone number. Deprecated: No longer supported. Please see Sharing CloudKit Data with Other iCloud Users.

func (*CKContainer) DiscoverUserIdentityWithUserRecordIDCompletionHandler

func (o *CKContainer) DiscoverUserIdentityWithUserRecordIDCompletionHandler(userRecordID *CKRecordID, completionHandler func(unsafe.Pointer, unsafe.Pointer))

Fetches the user identity for the specified user record ID. Deprecated: No longer supported. Please see Sharing CloudKit Data with Other iCloud Users.

func (*CKContainer) FetchAllLongLivedOperationIDsWithCompletionHandler

func (o *CKContainer) FetchAllLongLivedOperationIDsWithCompletionHandler(completionHandler func(*foundation.NSArray[*foundation.NSString], unsafe.Pointer))

Fetches the IDs of any long-lived operations that are running.

func (*CKContainer) FetchLongLivedOperationWithIDCompletionHandler

func (o *CKContainer) FetchLongLivedOperationWithIDCompletionHandler(operationID *foundation.NSString, completionHandler func(unsafe.Pointer, unsafe.Pointer))

Fetches the long-lived operation for the specified operation ID.

func (*CKContainer) FetchShareMetadataWithURLCompletionHandler

func (o *CKContainer) FetchShareMetadataWithURLCompletionHandler(url *foundation.NSURL, completionHandler func(*CKShareMetadata, unsafe.Pointer))

Fetches the share metadata for the specified share URL.

func (*CKContainer) FetchShareParticipantWithEmailAddressCompletionHandler

func (o *CKContainer) FetchShareParticipantWithEmailAddressCompletionHandler(emailAddress *foundation.NSString, completionHandler func(*CKShareParticipant, unsafe.Pointer))

Fetches the share participant with the specified email address.

func (*CKContainer) FetchShareParticipantWithPhoneNumberCompletionHandler

func (o *CKContainer) FetchShareParticipantWithPhoneNumberCompletionHandler(phoneNumber *foundation.NSString, completionHandler func(*CKShareParticipant, unsafe.Pointer))

Fetches the share participant with the specified phone number.

func (*CKContainer) FetchShareParticipantWithUserRecordIDCompletionHandler

func (o *CKContainer) FetchShareParticipantWithUserRecordIDCompletionHandler(userRecordID *CKRecordID, completionHandler func(*CKShareParticipant, unsafe.Pointer))

Fetches the share participant with the specified user record ID.

func (*CKContainer) FetchUserRecordIDWithCompletionHandler

func (o *CKContainer) FetchUserRecordIDWithCompletionHandler(completionHandler func(*CKRecordID, unsafe.Pointer))

Fetches the user record ID of the current user.

func (*CKContainer) PrivateCloudDatabase

func (o *CKContainer) PrivateCloudDatabase() *CKDatabase

The user's private database. The user's private database is only available if the device has an iCloud account. Only the user can access their private database, by default. They own all of the database's content and can view and modify that content. Data in the private database isn't visible in the developer portal. Data in the private database counts toward the user's iCloud storage quota. If there isn't an iCloud account on the user's device, this property still returns a database, but any attempt to use it results in an error. To determine if there is an iCloud account on the device, use the “CKContainer/accountStatus(completionHandler:)“ method.

func (*CKContainer) PublicCloudDatabase

func (o *CKContainer) PublicCloudDatabase() *CKDatabase

The app's public database. This database is available regardless of whether the user's device has an 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 objects, they create. The public database's contents are visible in the developer portal, where you can assign roles to users and restrict access as necessary. Data in the public database counts toward your app's iCloud storage quota.

func (*CKContainer) RequestApplicationPermissionCompletionHandler

func (o *CKContainer) RequestApplicationPermissionCompletionHandler(applicationPermission CKApplicationPermissions, completionHandler func(CKApplicationPermissionStatus, unsafe.Pointer))

Prompts the user to authorize the specified permission. Deprecated: No longer supported. Please see Sharing CloudKit Data with Other iCloud Users.

func (*CKContainer) SharedCloudDatabase

func (o *CKContainer) SharedCloudDatabase() *CKDatabase

The database that contains shared data. This database is only available if the device has an iCloud account. Permissions on the database are available only to the user according to the permissions of the enclosing “CKShare“ instance, which represents the shared record. The current user doesn't own the content in the shared database, and can view and modify that content only if the necessary permissions exist. Data in the shared database isn't visible in the developer portal or to any user who doesn't have access. Data in the shared database counts toward your app's iCloud storage quota. If there isn't an iCloud account on the user's device, this property still returns a database, but any attempt to use it results in an error. To determine if there is an iCloud account on the device, use the “CKContainer/accountStatus(completionHandler:)“ method.

func (*CKContainer) StatusForApplicationPermissionCompletionHandler

func (o *CKContainer) StatusForApplicationPermissionCompletionHandler(applicationPermission CKApplicationPermissions, completionHandler func(CKApplicationPermissionStatus, unsafe.Pointer))

Determines the authorization status of the specified permission. Deprecated: No longer supported. Please see Sharing CloudKit Data with Other iCloud Users.

type CKDatabase

type CKDatabase struct {
	foundation.NSObject
}

An object that represents a collection of record zones and subscriptions.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckdatabase

func CKDatabaseFromID

func CKDatabaseFromID(id objc.ID) *CKDatabase

func (*CKDatabase) AddOperation

func (o *CKDatabase) AddOperation(operation *CKDatabaseOperation)

Executes the specified operation in the current database.

func (*CKDatabase) DatabaseScope

func (o *CKDatabase) DatabaseScope() CKDatabaseScope

func (*CKDatabase) DeleteRecordWithIDCompletionHandler

func (o *CKDatabase) DeleteRecordWithIDCompletionHandler(recordID *CKRecordID, completionHandler func(*CKRecordID, unsafe.Pointer))

Deletes a specific record.

func (*CKDatabase) DeleteRecordZoneWithIDCompletionHandler

func (o *CKDatabase) DeleteRecordZoneWithIDCompletionHandler(zoneID *CKRecordZoneID, completionHandler func(*CKRecordZoneID, unsafe.Pointer))

Deletes a specific record zone.

func (*CKDatabase) DeleteSubscriptionWithIDCompletionHandler

func (o *CKDatabase) DeleteSubscriptionWithIDCompletionHandler(subscriptionID *foundation.NSString, completionHandler func(*foundation.NSString, unsafe.Pointer))

Deletes a specific subscription and delivers the deleted subscription’s identifier to a completion handler.

func (*CKDatabase) FetchAllRecordZonesWithCompletionHandler

func (o *CKDatabase) FetchAllRecordZonesWithCompletionHandler(completionHandler func(*foundation.NSArray[*CKRecordZone], unsafe.Pointer))

Fetches all record zones from the current database.

func (*CKDatabase) FetchAllSubscriptionsWithCompletionHandler

func (o *CKDatabase) FetchAllSubscriptionsWithCompletionHandler(completionHandler func(*foundation.NSArray[*CKSubscription], unsafe.Pointer))

Fetches all subscriptions from the current database.

func (*CKDatabase) FetchRecordWithIDCompletionHandler

func (o *CKDatabase) FetchRecordWithIDCompletionHandler(recordID *CKRecordID, completionHandler func(*CKRecord, unsafe.Pointer))

Fetches a specific record.

func (*CKDatabase) FetchRecordZoneWithIDCompletionHandler

func (o *CKDatabase) FetchRecordZoneWithIDCompletionHandler(zoneID *CKRecordZoneID, completionHandler func(*CKRecordZone, unsafe.Pointer))

Fetches a specific record zone.

func (*CKDatabase) FetchSubscriptionWithIDCompletionHandler

func (o *CKDatabase) FetchSubscriptionWithIDCompletionHandler(subscriptionID *foundation.NSString, completionHandler func(*CKSubscription, unsafe.Pointer))

Fetches a specific subscription and delivers it to a completion handler.

func (*CKDatabase) PerformQueryInZoneWithIDCompletionHandler

func (o *CKDatabase) PerformQueryInZoneWithIDCompletionHandler(query *CKQuery, zoneID *CKRecordZoneID, completionHandler func(*foundation.NSArray[*CKRecord], unsafe.Pointer))

Searches for records matching a predicate in the specified record zone.

func (*CKDatabase) SaveRecordCompletionHandler

func (o *CKDatabase) SaveRecordCompletionHandler(record *CKRecord, completionHandler func(*CKRecord, unsafe.Pointer))

Saves a specific record.

func (*CKDatabase) SaveRecordZoneCompletionHandler

func (o *CKDatabase) SaveRecordZoneCompletionHandler(zone *CKRecordZone, completionHandler func(*CKRecordZone, unsafe.Pointer))

Saves a specific record zone.

func (*CKDatabase) SaveSubscriptionCompletionHandler

func (o *CKDatabase) SaveSubscriptionCompletionHandler(subscription *CKSubscription, completionHandler func(*CKSubscription, unsafe.Pointer))

Saves a specific subscription.

type CKDatabaseNotification

type CKDatabaseNotification struct {
	CKNotification
}

A notification that triggers when the contents of a database change.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckdatabasenotification

func CKDatabaseNotificationFromID

func CKDatabaseNotificationFromID(id objc.ID) *CKDatabaseNotification

func (*CKDatabaseNotification) DatabaseScope

func (o *CKDatabaseNotification) DatabaseScope() CKDatabaseScope

type CKDatabaseOperation

type CKDatabaseOperation struct {
	CKOperation
}

The abstract base class for operations that act upon databases in CloudKit.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckdatabaseoperation

func CKDatabaseOperationFromID

func CKDatabaseOperationFromID(id objc.ID) *CKDatabaseOperation

func (*CKDatabaseOperation) Database

func (o *CKDatabaseOperation) Database() *CKDatabase

func (*CKDatabaseOperation) SetDatabase

func (o *CKDatabaseOperation) SetDatabase(database *CKDatabase)

type CKDatabaseScope

type CKDatabaseScope int64

Constants that represent the scope of a database.

const (
	// The public database. Records in a public database: - By default are world readable, owner writable. - Can be locked down by Roles, a process done in the Developer Portal, a web interface.  Roles are not present in the client API. - Are visible to the application developer via the Developer Portal. - Do not contribute to the owner's iCloud account storage quota.
	CKDatabaseScopePublic CKDatabaseScope = 1
	// The private database. Records in a private database: - By default are owner readable and owner writable. - Are not visible to the application developer via the Developer Portal. - Are counted towards the owner's iCloud account storage quota.
	CKDatabaseScopePrivate CKDatabaseScope = 2
	// The shared database. Records in a shared database: - Are available to share participants based on the permissions of the enclosing “CKShare“ - Are not visible to the application developer via the Developer Portal. - Are counted towards the originating owner's iCloud account storage quota.
	CKDatabaseScopeShared CKDatabaseScope = 3
)

func (CKDatabaseScope) String

func (e CKDatabaseScope) String() string

type CKDatabaseSubscription

type CKDatabaseSubscription struct {
	CKSubscription
}

A subscription that generates push notifications when CloudKit modifies records in a database.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckdatabasesubscription

func CKDatabaseSubscriptionFromID

func CKDatabaseSubscriptionFromID(id objc.ID) *CKDatabaseSubscription

func CKDatabaseSubscriptionNew

func CKDatabaseSubscriptionNew() *CKDatabaseSubscription

Creates an empty database subscription. Deprecated: since macOS 10.12.

func (*CKDatabaseSubscription) Init

Creates an empty database subscription. Deprecated: since macOS 10.12.

func (*CKDatabaseSubscription) InitWithCoder

func (o *CKDatabaseSubscription) InitWithCoder(aDecoder *foundation.NSCoder) *CKDatabaseSubscription

Creates a database subscription from a serialized instance.

func (*CKDatabaseSubscription) InitWithSubscriptionID

func (o *CKDatabaseSubscription) InitWithSubscriptionID(subscriptionID *foundation.NSString) *CKDatabaseSubscription

Creates a named subscription for all records in a database.

func (*CKDatabaseSubscription) RecordType

func (o *CKDatabaseSubscription) RecordType() *foundation.NSString

func (*CKDatabaseSubscription) SetRecordType

func (o *CKDatabaseSubscription) SetRecordType(recordType *foundation.NSString)

type CKDiscoverAllUserIdentitiesOperation

type CKDiscoverAllUserIdentitiesOperation struct {
	CKOperation
}

An operation that uses the device’s contacts to search for discoverable iCloud users.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckdiscoveralluseridentitiesoperation Deprecated: No longer supported. Please see Sharing CloudKit Data with Other iCloud Users.

func CKDiscoverAllUserIdentitiesOperationFromID

func CKDiscoverAllUserIdentitiesOperationFromID(id objc.ID) *CKDiscoverAllUserIdentitiesOperation

func (*CKDiscoverAllUserIdentitiesOperation) DiscoverAllUserIdentitiesCompletionBlock

func (o *CKDiscoverAllUserIdentitiesOperation) DiscoverAllUserIdentitiesCompletionBlock() objc.Block

The closure to execute when the operation finishes. The closure doesn't return a value and takes the following parameter: - An error if a problem occurs, or `nil` if CloudKit successfully fetches the user identities. This closure executes only once, after all of the individual discovery closures finish. The closure executes serially with respect to the operation's other closures. If you intend to use this closure to process results, update the property's value before you execute the operation or submit it to a queue.

func (*CKDiscoverAllUserIdentitiesOperation) Init

Creates an operation for searching the device’s contacts.

func (*CKDiscoverAllUserIdentitiesOperation) SetDiscoverAllUserIdentitiesCompletionBlock

func (o *CKDiscoverAllUserIdentitiesOperation) SetDiscoverAllUserIdentitiesCompletionBlock(discoverAllUserIdentitiesCompletionBlock func(unsafe.Pointer))

func (*CKDiscoverAllUserIdentitiesOperation) SetUserIdentityDiscoveredBlock

func (o *CKDiscoverAllUserIdentitiesOperation) SetUserIdentityDiscoveredBlock(userIdentityDiscoveredBlock func(*CKUserIdentity))

func (*CKDiscoverAllUserIdentitiesOperation) UserIdentityDiscoveredBlock

func (o *CKDiscoverAllUserIdentitiesOperation) UserIdentityDiscoveredBlock() objc.Block

The closure to execute for each user identity. The closure doesn't return a value and takes the following parameter: - The user identity that matches an entry in the device's Contacts. The operation executes this closure one or more times for each user identity it discovers. Each time the closure executes, it executes serially with respect to the other closures of the operation. If you intend to use this closure to process results, set it before you execute the operation or add the operation to a queue.

type CKDiscoverUserIdentitiesOperation

type CKDiscoverUserIdentitiesOperation struct {
	CKOperation
}

An operation that uses the provided criteria to search for discoverable iCloud users.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckdiscoveruseridentitiesoperation Deprecated: No longer supported. Please see Sharing CloudKit Data with Other iCloud Users.

func CKDiscoverUserIdentitiesOperationFromID

func CKDiscoverUserIdentitiesOperationFromID(id objc.ID) *CKDiscoverUserIdentitiesOperation

func (*CKDiscoverUserIdentitiesOperation) DiscoverUserIdentitiesCompletionBlock

func (o *CKDiscoverUserIdentitiesOperation) DiscoverUserIdentitiesCompletionBlock() objc.Block

The closure to execute when the operation finishes. The closure doesn't return a value and takes the following parameter: - An error if a problem occurs, or `nil` if CloudKit successfully fetches the user identities. This closure executes only once, after all of the individual discovery closures finish. The closure executes serially with respect to the operation's other closures. If you intend to use this closure to process results, update the property's value before you execute the operation or submit it to a queue.

func (*CKDiscoverUserIdentitiesOperation) Init

Creates an operation for discovering user identities.

func (*CKDiscoverUserIdentitiesOperation) InitWithUserIdentityLookupInfos

func (o *CKDiscoverUserIdentitiesOperation) InitWithUserIdentityLookupInfos(userIdentityLookupInfos *foundation.NSArray[*CKUserIdentityLookupInfo]) *CKDiscoverUserIdentitiesOperation

Creates an operation for discovering the user identities of the specified lookup infos.

func (*CKDiscoverUserIdentitiesOperation) SetDiscoverUserIdentitiesCompletionBlock

func (o *CKDiscoverUserIdentitiesOperation) SetDiscoverUserIdentitiesCompletionBlock(discoverUserIdentitiesCompletionBlock func(unsafe.Pointer))

func (*CKDiscoverUserIdentitiesOperation) SetUserIdentityDiscoveredBlock

func (o *CKDiscoverUserIdentitiesOperation) SetUserIdentityDiscoveredBlock(userIdentityDiscoveredBlock func(*CKUserIdentity, *CKUserIdentityLookupInfo))

func (*CKDiscoverUserIdentitiesOperation) SetUserIdentityLookupInfos

func (o *CKDiscoverUserIdentitiesOperation) SetUserIdentityLookupInfos(userIdentityLookupInfos *foundation.NSArray[*CKUserIdentityLookupInfo])

func (*CKDiscoverUserIdentitiesOperation) UserIdentityDiscoveredBlock

func (o *CKDiscoverUserIdentitiesOperation) UserIdentityDiscoveredBlock() objc.Block

The closure to execute for each user identity. The closure doesn't return a value and takes the following parameters: - The user identity. - The lookup info that corresponds to the user identity. The operation executes this closure one or more times for each user identity it discovers. Each time the closure executes, it executes serially with respect to the other closures of the operation. If you intend to use this closure to process results, set it before you execute the operation or add the operation to a queue.

func (*CKDiscoverUserIdentitiesOperation) UserIdentityLookupInfos

The lookup info for discovering user identities. Use this property to view or change the lookup info that CloudKit uses to discover user identities. If you intend to modify this property's value, do so before you execute the operation or submit it to a queue.

type CKErrorCode

type CKErrorCode int64

The error codes that CloudKit returns.

const (
	// A nonrecoverable error that CloudKit encounters. If you receive this error, file a [bug report](http://radar.apple.com) that includes the error log.
	CKErrorInternalError CKErrorCode = 1
	// An error that occurs when an operation completes with partial failures. Examine the specific item failures, and act on the failed items. Each specific item error is from the CloudKit error domain. You can inspect the <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> “CKPartialErrorsByItemIDKey“ to see per-item errors. Note that in a custom zone, the system processes all items in an operation atomically. As a result, you may get a “CKError/Code/batchRequestFailed“ error for all other items in an operation that don't cause an error.
	CKErrorPartialFailure CKErrorCode = 2
	// An error that occurs when the network is unavailable. You can retry network failures immediately, but have your app implement a backoff period so that it doesn't attempt the same operation repeatedly. If the network is unavailable, have your app monitor for network reachability and wait to reissue the operation when the network is available again. See <doc://com.apple.documentation/documentation/cfnetwork/cfnetworkerrors> for more information.
	CKErrorNetworkUnavailable CKErrorCode = 3
	// An error that occurs when a network is available, but CloudKit is inaccessible. You can retry network failures immediately, but have your app implement a backoff period so that it doesn't attempt the same operation repeatedly. If the network is unavailable, have your app monitor for network reachability and wait to reissue the operation when the network is available again. See <doc://com.apple.documentation/documentation/cfnetwork/cfnetworkerrors> for more information.
	CKErrorNetworkFailure CKErrorCode = 4
	// An error that occurs when you use an unknown or unauthorized container.
	CKErrorBadContainer CKErrorCode = 5
	// An error that occurs when CloudKit is unavailable.
	CKErrorServiceUnavailable CKErrorCode = 6
	// An error that occurs when CloudKit rate-limits requests. Check for a “CKErrorRetryAfterKey“ key in the <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary of any CloudKit error that you receive. It's especially important to check for it if you receive any of these errors. Use the value of the “CKErrorRetryAfterKey“ key as the number of seconds to wait before retrying this operation.
	CKErrorRequestRateLimited CKErrorCode = 7
	// An error that occurs when the app is missing a required entitlement.
	CKErrorMissingEntitlement CKErrorCode = 8
	// An error that occurs when CloudKit cannot authenticate the user.
	CKErrorNotAuthenticated CKErrorCode = 9
	// An error that occurs when the user doesn't have permission to save or fetch data. This error typically occurs in the public database in one of these circumstances: - You have roles for record types. - Your app is trying to accept a share that the user doesn't have an invitation for. Let users know they can't perform this operation. This error is nonrecoverable and you can't retry the operation.
	CKErrorPermissionFailure CKErrorCode = 10
	// An error that occurs when the specified record doesn't exist.
	CKErrorUnknownItem CKErrorCode = 11
	// An error that occurs when the request contains invalid information. Consult the error's <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary for more information about the issue.
	CKErrorInvalidArguments CKErrorCode = 12
	// An error that occurs when CloudKit truncates a query's results.
	CKErrorResultsTruncated CKErrorCode = 13
	// An error that occurs when CloudKit rejects a record because the server's version is different. This error indicates that the server's version of the record is newer than the local version the client's trying to save. Your app needs to handle this error, resolve any conflicts in the record, and attempt another save of the record, if necessary. CloudKit provides your app with three copies of the record in this error's `userInfo` dictionary to assist with comparing and merging the changes: - “CKRecordChangedErrorClientRecordKey“: The local record that the client's trying to save. - “CKRecordChangedErrorServerRecordKey“: The record that exists on the server. - “CKRecordChangedErrorAncestorRecordKey“: The original version of the record. When a conflict occurs, your app needs to merge all changes into the record for the “CKRecordChangedErrorServerRecordKey“ key and attempt a new save using that record. Merging into either of the other two copies of the record results in another conflict error because those records have the old record change tag.
	CKErrorServerRecordChanged CKErrorCode = 14
	// An error that occurs when CloudKit rejects the request. This error is nonrecoverable.
	CKErrorServerRejectedRequest CKErrorCode = 15
	// An error that occurs when the system can't find the specified asset.
	CKErrorAssetFileNotFound CKErrorCode = 16
	// An error that occurs when the system modifies an asset while saving it.
	CKErrorAssetFileModified CKErrorCode = 17
	// An error that occurs when the current app version is older than the oldest allowed version.
	CKErrorIncompatibleVersion CKErrorCode = 18
	// An error that occurs when the server rejects the request because of a unique constraint violation.
	CKErrorConstraintViolation CKErrorCode = 19
	// An error that occurs when an operation cancels.
	CKErrorOperationCancelled CKErrorCode = 20
	// An error that occurs when the change token expires.
	CKErrorChangeTokenExpired CKErrorCode = 21
	// An error that occurs when the system rejects the entire batch of changes. This error occurs when an operation attempts to save multiple items in a custom zone, but one of those items encounters an error. Because custom zones are atomic, the entire batch fails. The items that cause the problem have their own errors, and all other items in the batch have a “CKError/Code/batchRequestFailed“ error to indicate that the system can't save them. This error indicates that the system can't process the associated item due to an error in another item in the operation. Check the other per-item errors under “CKPartialErrorsByItemIDKey“ for any that aren't “CKError/Code/batchRequestFailed“ errors. Handle those errors, and then retry all items in the operation.
	CKErrorBatchRequestFailed CKErrorCode = 22
	// An error that occurs when the server is too busy to handle the record zone operation. Try the operation again in a few seconds. If you encounter this error again, increase the delay time exponentially for each subsequent retry to minimize server contention for the zone. Check for a “CKErrorRetryAfterKey“ key in the <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary of any CloudKit error that you receive. Use the value of this key as the number of seconds to wait before retrying the operation.
	CKErrorZoneBusy CKErrorCode = 23
	// An error that occurs when the operation can't complete for the specified database. The system submitted the operation to the wrong database. Make sure you aren't submitting a share operation to the public database, or a record zone create operation to the shared database.
	CKErrorBadDatabase CKErrorCode = 24
	// An error that occurs when saving a record exceeds the user's storage quota. **In the public database**: Your app's container doesn't have enough storage. Individual users can't do anything about this, but you can go to the CloudKit Dashboard to view and manage your container's storage. **In the private database**: The user doesn't have enough iCloud storage. Prompt the user to go to iCloud settings to manage their storage. **In the shared database**: The owner of the shared record zone doesn't have enough iCloud storage. The user can't do anything about this, but can contact the owner about upgrading their storage or cleaning up their iCloud account.
	CKErrorQuotaExceeded CKErrorCode = 25
	// An error that occurs when the specified record zone doesn't exist.
	CKErrorZoneNotFound CKErrorCode = 26
	// An error that occurs when a request's size exceeds the limit. The server can change its limits at any time, but the following are general guidelines: - 400 items (records or shares) per operation - 2 MB per request (not counting asset sizes) If your app receives “CKError/Code/limitExceeded“, it must split the operation in half and try both requests again.
	CKErrorLimitExceeded CKErrorCode = 27
	// An error that occurs when the user deletes a record zone using the Settings app.
	CKErrorUserDeletedZone CKErrorCode = 28
	// An error that occurs when a share has too many participants. Remove some participants before you retry the operation. Limits can change at any time, but CloudKit generally enforces a maximum of 100 participants for a share.
	CKErrorTooManyParticipants CKErrorCode = 29
	// An error that occurs when CloudKit attempts to share a record with an existing share. A record can exist in only a single share at a time. This error means that one of the following conditions exists: - The record already has an existing share. - The record has a parent, and its parent has a share. - The record is a parent, and one of its children has a share.
	CKErrorAlreadyShared CKErrorCode = 30
	// An error that occurs when CloudKit can't find the target of a reference.
	CKErrorReferenceViolation CKErrorCode = 31
	// An error that occurs when CloudKit rejects a request due to a managed-account restriction. The system restricts CloudKit access for this account. This is a nonrecoverable error.
	CKErrorManagedAccountRestricted CKErrorCode = 32
	// An error that occurs when the user isn't a participant of the share. A fetch share metadata operation fails when the user isn't a participant of the share. However, there are invited participants on the share with email addresses or phone numbers that don't have associations with an iCloud account. The user may be able to join a share by associating one of those email addresses or phone numbers with the user's iCloud account. Call <doc://com.apple.documentation/documentation/uikit/uiapplication/openurl(_:)> on the share URL to have the user attempt to verify their information.
	CKErrorParticipantMayNeedVerification CKErrorCode = 33
	// An error that occurs when CloudKit is unable to maintain the network connection and provide a response. You can retry operations that are idempotent. For non-idempotent operations, you should consult server state to determine if the operation succeeded.
	CKErrorServerResponseLost CKErrorCode = 34
	// An error that occurs when the system can't access the specified asset.
	CKErrorAssetNotAvailable CKErrorCode = 35
	// An error that occurs when the user's iCloud account is temporarily unavailable. You receive this error when the user's iCloud account is available, but isn't ready to support CloudKit operations. Don't delete any cached data and don't enqueue any additional CloudKit operations. Checking the account status after the operation fails, assuming there are no other changes to the account's status, returns “CKAccountStatus/temporarilyUnavailable“. Use the <doc://com.apple.documentation/documentation/foundation/nsnotification/name-swift.struct/ckaccountchanged> notification to listen for future account status changes, and retry the operation after the status becomes “CKAccountStatus/available“.
	CKErrorAccountTemporarilyUnavailable CKErrorCode = 36
	// The user is already an invited participant on this share. They must accept the existing share invitation before continuing.
	CKErrorParticipantAlreadyInvited CKErrorCode = 37
)

func (CKErrorCode) String

func (e CKErrorCode) String() string

type CKFetchDatabaseChangesOperation

type CKFetchDatabaseChangesOperation struct {
	CKDatabaseOperation
}

An operation that fetches database changes.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchdatabasechangesoperation

func CKFetchDatabaseChangesOperationFromID

func CKFetchDatabaseChangesOperationFromID(id objc.ID) *CKFetchDatabaseChangesOperation

func (*CKFetchDatabaseChangesOperation) ChangeTokenUpdatedBlock

func (o *CKFetchDatabaseChangesOperation) ChangeTokenUpdatedBlock() objc.Block

The closure to execute when the change token updates. The closure executes periodically, and provides a new change token so that you don't need to refetch previously fetched record zone changes in a subsequent operation.

func (*CKFetchDatabaseChangesOperation) FetchAllChanges

func (o *CKFetchDatabaseChangesOperation) FetchAllChanges() bool

A Boolean value that indicates whether to send repeated requests to the server. If <doc://com.apple.documentation/documentation/swift/true>, the operation sends repeat requests to the server until it fetches all changes. CloudKit executes the handler you set on the “CKFetchDatabaseChangesOperation/changeTokenUpdatedBlock“ property with a change token after each request. The default value is <doc://com.apple.documentation/documentation/swift/true>.

func (*CKFetchDatabaseChangesOperation) FetchDatabaseChangesCompletionBlock

func (o *CKFetchDatabaseChangesOperation) FetchDatabaseChangesCompletionBlock() objc.Block

The closure to execute when the operation finishes. The closure returns no value and takes the following parameters: - The change token to store and use in subsequent instances of “CKFetchDatabaseChangesOperation“. - A Boolen value that indicates whether this is the final database change. If “CKFetchDatabaseChangesOperation/fetchAllChanges“ is <doc://com.apple.documentation/documentation/swift/false>, it's the app's responsibility to create additional instances of “CKFetchDatabaseChangesOperation“ to fetch further changes. - An error object that contains information about a problem, or `nil` if CloudKit successfully retrieves the database changes. - Note: The change token and error parameters are mutally exclusive — that is, the closure provides one of them but not both. Your app is responsible for saving the change token at the end of the operation and providing it to future uses of “CKFetchDatabaseChangesOperation“. If the server returns a “CKError/Code/changeTokenExpired“ error, the “CKFetchDatabaseChangesOperation/previousServerChangeToken“ value is stale and your app needs to clear its local cache and refetch the database changes, starting with a `nil` change token.

func (*CKFetchDatabaseChangesOperation) Init

Creates an empty fetch database changes operation.

func (*CKFetchDatabaseChangesOperation) InitWithPreviousServerChangeToken

func (o *CKFetchDatabaseChangesOperation) InitWithPreviousServerChangeToken(previousServerChangeToken *CKServerChangeToken) *CKFetchDatabaseChangesOperation

Creates an operation for fetching database changes.

func (*CKFetchDatabaseChangesOperation) PreviousServerChangeToken

func (o *CKFetchDatabaseChangesOperation) PreviousServerChangeToken() *CKServerChangeToken

The server change token. Assign the token you receive from the “CKFetchDatabaseChangesOperation/fetchDatabaseChangesCompletionBlock“ to this property. Doing so yields only the changes that occur after your most recent fetch operation. If you specify `nil` for this parameter, the operation fetches all changes.

func (*CKFetchDatabaseChangesOperation) RecordZoneWithIDChangedBlock

func (o *CKFetchDatabaseChangesOperation) RecordZoneWithIDChangedBlock() objc.Block

The closure to execute with a single record zone change. The closure returns no value and takes the following parameter: - term `zoneID`: The ID of the record zone that contains changes.

func (*CKFetchDatabaseChangesOperation) RecordZoneWithIDWasDeletedBlock

func (o *CKFetchDatabaseChangesOperation) RecordZoneWithIDWasDeletedBlock() objc.Block

The closure to execute when a record zone no longer exists. The closure returns no value and takes the following parameter: - term `zoneID`: The deleted record zone's ID.

func (*CKFetchDatabaseChangesOperation) RecordZoneWithIDWasDeletedDueToUserEncryptedDataResetBlock

func (o *CKFetchDatabaseChangesOperation) RecordZoneWithIDWasDeletedDueToUserEncryptedDataResetBlock() objc.Block

The closure to execute when a user-invoked account reset deletes a record zone. The closure returns no value and takes a single parameter: the deleted record zone's ID. The operation executes this closure, instead of “CKFetchDatabaseChangesOperation/recordZoneWithIDWasDeletedBlock“, after a user action causes CloudKit to delete the record zone. Reupload any locally cached data to iCloud to minimize data loss.

func (*CKFetchDatabaseChangesOperation) RecordZoneWithIDWasPurgedBlock

func (o *CKFetchDatabaseChangesOperation) RecordZoneWithIDWasPurgedBlock() objc.Block

The closure to execute when CloudKit purges a record zone. The closure returns no value and takes the following parameter: - term `zoneID`: The purged record zone's ID.

func (*CKFetchDatabaseChangesOperation) ResultsLimit

func (o *CKFetchDatabaseChangesOperation) ResultsLimit() uint

The maximum number of results that the operation fetches. Use this property to limit the number of changes this operation returns. When the operation reaches the limit, it updates the change token and returns it to indicate that more results are available.

func (*CKFetchDatabaseChangesOperation) SetChangeTokenUpdatedBlock

func (o *CKFetchDatabaseChangesOperation) SetChangeTokenUpdatedBlock(changeTokenUpdatedBlock func(*CKServerChangeToken))

func (*CKFetchDatabaseChangesOperation) SetFetchAllChanges

func (o *CKFetchDatabaseChangesOperation) SetFetchAllChanges(fetchAllChanges bool)

func (*CKFetchDatabaseChangesOperation) SetFetchDatabaseChangesCompletionBlock

func (o *CKFetchDatabaseChangesOperation) SetFetchDatabaseChangesCompletionBlock(fetchDatabaseChangesCompletionBlock func(*CKServerChangeToken, bool, unsafe.Pointer))

func (*CKFetchDatabaseChangesOperation) SetPreviousServerChangeToken

func (o *CKFetchDatabaseChangesOperation) SetPreviousServerChangeToken(previousServerChangeToken *CKServerChangeToken)

func (*CKFetchDatabaseChangesOperation) SetRecordZoneWithIDChangedBlock

func (o *CKFetchDatabaseChangesOperation) SetRecordZoneWithIDChangedBlock(recordZoneWithIDChangedBlock func(*CKRecordZoneID))

func (*CKFetchDatabaseChangesOperation) SetRecordZoneWithIDWasDeletedBlock

func (o *CKFetchDatabaseChangesOperation) SetRecordZoneWithIDWasDeletedBlock(recordZoneWithIDWasDeletedBlock func(*CKRecordZoneID))

func (*CKFetchDatabaseChangesOperation) SetRecordZoneWithIDWasDeletedDueToUserEncryptedDataResetBlock

func (o *CKFetchDatabaseChangesOperation) SetRecordZoneWithIDWasDeletedDueToUserEncryptedDataResetBlock(recordZoneWithIDWasDeletedDueToUserEncryptedDataResetBlock func(*CKRecordZoneID))

func (*CKFetchDatabaseChangesOperation) SetRecordZoneWithIDWasPurgedBlock

func (o *CKFetchDatabaseChangesOperation) SetRecordZoneWithIDWasPurgedBlock(recordZoneWithIDWasPurgedBlock func(*CKRecordZoneID))

func (*CKFetchDatabaseChangesOperation) SetResultsLimit

func (o *CKFetchDatabaseChangesOperation) SetResultsLimit(resultsLimit uint)

type CKFetchRecordChangesOperation

type CKFetchRecordChangesOperation struct {
	CKDatabaseOperation
}

An operation that reports on the changed and deleted records in the specified record zone.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchrecordchangesoperation Deprecated: since macOS 10.12.

func CKFetchRecordChangesOperationFromID

func CKFetchRecordChangesOperationFromID(id objc.ID) *CKFetchRecordChangesOperation

func (*CKFetchRecordChangesOperation) DesiredKeys

The fields to fetch for the requested records. Use this property to limit the amount of data that the system retrieves for each record during the fetch operation. This property contains an array of strings, each of which contains the name of a field from the target records. When you retrieve a record, the returned records only include fields with names that match one of the keys in this property. The default value is `nil`, which causes the system to fetch all keys of the record. Because you can fetch records of different types, configure the array to include the merged set of all field names for the requested records and at least one field name from each record type. If you intend to specify the desired set of keys, set the value of this property before executing the operation or submitting it to a queue.

func (*CKFetchRecordChangesOperation) FetchRecordChangesCompletionBlock

func (o *CKFetchRecordChangesOperation) FetchRecordChangesCompletionBlock() objc.Block

The block to execute when the system finishes processing all changes. The block returns no value and takes the following parameters: - term `serverChangeToken`: The new change token from the server. You can store this token locally and use it during subsequent fetch operations to limit the results to records that the system changes after executing the operation. - term `clientChangeToken`: The most recent client change token from the device. If the change token isn't the most recent change token you provided, the server might not have received the associated changes. - term `operationError`: An error object that contains information about a problem, or `nil` if the system successfully retrieves the changes. When implementing this block, check the “CKFetchRecordChangesOperation/moreComing“ property of the operation object to verify that the server was able to deliver all results. If that property is <doc://com.apple.documentation/documentation/swift/true>, you must create another operation object using the value in the `serverChangeToken` parameter to fetch any remaining changes. The operation object executes this block only once at the conclusion of the operation. It executes after all individual change blocks, but before the operation's completion block. The block executes serially with respect to the other progress blocks of the operation. If you intend to use this block to process results, set it before executing the operation or submitting the operation object to a queue.

func (*CKFetchRecordChangesOperation) Init

Creates an empty fetch record changes operation. Deprecated: since macOS 10.12.

func (*CKFetchRecordChangesOperation) InitWithRecordZoneIDPreviousServerChangeToken

func (o *CKFetchRecordChangesOperation) InitWithRecordZoneIDPreviousServerChangeToken(recordZoneID *CKRecordZoneID, previousServerChangeToken *CKServerChangeToken) *CKFetchRecordChangesOperation

Creates an operation for fetching changes in the specified record zone.

func (*CKFetchRecordChangesOperation) MoreComing

func (o *CKFetchRecordChangesOperation) MoreComing() bool

A Boolean value that indicates whether more results are available. If the server is unable to deliver all of the changed results with this operation object, it sets this property to <doc://com.apple.documentation/documentation/swift/true> before executing the block in the “CKFetchRecordChangesOperation/fetchRecordChangesCompletionBlock“ property. To fetch the remaining changes, create a new “CKFetchRecordChangesOperation“ object using the change token that the server returns.

func (*CKFetchRecordChangesOperation) PreviousServerChangeToken

func (o *CKFetchRecordChangesOperation) PreviousServerChangeToken() *CKServerChangeToken

The token that identifies the starting point for retrieving changes. Each fetch request returns a unique token in addition to any changes. The token passes as a parameter to your “CKFetchRecordChangesOperation/fetchRecordChangesCompletionBlock“ handler. During a subsequent fetch request, providing the previous token causes the server to return only the changes that occur after the previous fetch request. Tokens are opaque data objects that you can write to disk safely and reuse later. Typically, you set the value of this property when you initialize the operation object. If you intend to change the record zone, update the value of the property before executing the operation or submitting it to a queue.

func (*CKFetchRecordChangesOperation) RecordChangedBlock

func (o *CKFetchRecordChangesOperation) RecordChangedBlock() objc.Block

The block to execute with the contents of a changed record. The block returns no value and takes the following parameters: - term `record`: The changed record. If you specify a value for the “CKFetchRecordChangesOperation/desiredKeys“ property, the record only contains the fields in the “CKFetchRecordChangesOperation/desiredKeys“ property. The operation object executes this block once for each record in the zone with changes since the previous fetch request. Each time the block executes, it executes serially with respect to the other progress blocks of the operation. If no records change, the block doesn't execute. If you intend to use this block to process results, set it before executing the operation or submitting it to a queue.

func (*CKFetchRecordChangesOperation) RecordWithIDWasDeletedBlock

func (o *CKFetchRecordChangesOperation) RecordWithIDWasDeletedBlock() objc.Block

The block to execute with the ID of a deleted record. The block returns no value and takes the following parameters: - term `recordID`: The ID of the deleted record. The operation object executes this block once for each record the server deletes in the record zone after the previous fetch request. Each time the block executes, it executes serially with respect to the other progress blocks of the operation. If there aren't any deleted records, this block doesn't execute. If you intend to use this block to process results, set it before executing the operation or submitting it to a queue.

func (*CKFetchRecordChangesOperation) RecordZoneID

func (o *CKFetchRecordChangesOperation) RecordZoneID() *CKRecordZoneID

The ID of the record zone with the records you want to fetch. Typically, you set the value of this property when you initialize the operation object. If you intend to change the record zone, update the value before executing the operation or submitting it to a queue.

func (*CKFetchRecordChangesOperation) ResultsLimit

func (o *CKFetchRecordChangesOperation) ResultsLimit() uint

The maximum number of changed records to report with this operation object. Use this property to limit the number of results in situations where you expect the number of changed records to be large. The default value is 0, which causes the server to return an appropriate number of results using dynamic conditions. When the number of returned results exceeds the results limit, the operation object sets the “CKFetchRecordChangesOperation/moreComing“ property to <doc://com.apple.documentation/documentation/swift/true> before executing the block in the “CKFetchRecordChangesOperation/fetchRecordChangesCompletionBlock“ property. In your block, check the value of that property, and if it's <doc://com.apple.documentation/documentation/swift/true>, create a new “CKFetchRecordChangesOperation“ object to fetch more results.

func (*CKFetchRecordChangesOperation) SetDesiredKeys

func (o *CKFetchRecordChangesOperation) SetDesiredKeys(desiredKeys *foundation.NSArray[*foundation.NSString])

func (*CKFetchRecordChangesOperation) SetFetchRecordChangesCompletionBlock

func (o *CKFetchRecordChangesOperation) SetFetchRecordChangesCompletionBlock(fetchRecordChangesCompletionBlock func(*CKServerChangeToken, *foundation.NSData, unsafe.Pointer))

func (*CKFetchRecordChangesOperation) SetPreviousServerChangeToken

func (o *CKFetchRecordChangesOperation) SetPreviousServerChangeToken(previousServerChangeToken *CKServerChangeToken)

func (*CKFetchRecordChangesOperation) SetRecordChangedBlock

func (o *CKFetchRecordChangesOperation) SetRecordChangedBlock(recordChangedBlock func(*CKRecord))

func (*CKFetchRecordChangesOperation) SetRecordWithIDWasDeletedBlock

func (o *CKFetchRecordChangesOperation) SetRecordWithIDWasDeletedBlock(recordWithIDWasDeletedBlock func(*CKRecordID))

func (*CKFetchRecordChangesOperation) SetRecordZoneID

func (o *CKFetchRecordChangesOperation) SetRecordZoneID(recordZoneID *CKRecordZoneID)

func (*CKFetchRecordChangesOperation) SetResultsLimit

func (o *CKFetchRecordChangesOperation) SetResultsLimit(resultsLimit uint)

type CKFetchRecordZoneChangesConfiguration

type CKFetchRecordZoneChangesConfiguration struct {
	foundation.NSObject
}

A configuration object that describes the information to fetch from a record zone.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchrecordzonechangesconfiguration

func CKFetchRecordZoneChangesConfigurationFromID

func CKFetchRecordZoneChangesConfigurationFromID(id objc.ID) *CKFetchRecordZoneChangesConfiguration

func (*CKFetchRecordZoneChangesConfiguration) DesiredKeys

The fields to fetch for the requested records. Use this property to limit the amount of data that CloudKit retrieves for each record during the fetch operation. This property contains an array of strings, each of which is the name of a field from the target records. When you retrieve a record, CloudKit only includes fields with names that match one of the keys in this property. The default value is `nil`, which causes CloudKit to fetch all of the record's keys. Because you can fetch records of different types, configure the array to include the merged set of all field names for the requested records and at least one field name from each record type. If you intend to specify the desired set of keys, set the value of this property before executing the operation or submitting it to a queue.

func (*CKFetchRecordZoneChangesConfiguration) PreviousServerChangeToken

func (o *CKFetchRecordZoneChangesConfiguration) PreviousServerChangeToken() *CKServerChangeToken

The token that identifies the starting point for retrieving changes. Each fetch request returns a unique token in addition to any changes. CloudKit passes the token to your “CKFetchRecordZoneChangesOperation/recordZoneFetchResultBlock“ handler. During a subsequent fetch request, providing the previous token causes the server to return only the changes since the previous fetch request. Tokens are opaque values that you can write to disk safely and reuse later.

func (*CKFetchRecordZoneChangesConfiguration) ResultsLimit

func (o *CKFetchRecordZoneChangesConfiguration) ResultsLimit() uint

The maximum number of records to fetch from the record zone. Use this property to limit the number of results in situations where you expect a large number of records. The default value is 0, which causes the server to return an appropriate number of records using dynamic conditions. When the number of records that CloudKit returns exceeds this limit, the operation sets the `moreComing` property to <doc://com.apple.documentation/documentation/swift/true> when executing the “CKFetchRecordZoneChangesOperation/recordZoneFetchResultBlock“ handler.

func (*CKFetchRecordZoneChangesConfiguration) SetDesiredKeys

func (*CKFetchRecordZoneChangesConfiguration) SetPreviousServerChangeToken

func (o *CKFetchRecordZoneChangesConfiguration) SetPreviousServerChangeToken(previousServerChangeToken *CKServerChangeToken)

func (*CKFetchRecordZoneChangesConfiguration) SetResultsLimit

func (o *CKFetchRecordZoneChangesConfiguration) SetResultsLimit(resultsLimit uint)

type CKFetchRecordZoneChangesOperation

type CKFetchRecordZoneChangesOperation struct {
	CKDatabaseOperation
}

An operation that fetches record zone changes.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchrecordzonechangesoperation

func CKFetchRecordZoneChangesOperationFromID

func CKFetchRecordZoneChangesOperationFromID(id objc.ID) *CKFetchRecordZoneChangesOperation

func (*CKFetchRecordZoneChangesOperation) ConfigurationsByRecordZoneID

A dictionary of configurations for fetching change operations by zone identifier.

func (*CKFetchRecordZoneChangesOperation) FetchAllChanges

func (o *CKFetchRecordZoneChangesOperation) FetchAllChanges() bool

A Boolean value that indicates whether to send repeated requests to the server. If <doc://com.apple.documentation/documentation/swift/true>, the operation sends repeat requests to the server until it fetches all changes. CloudKit executes the handler you set on the “CKFetchRecordZoneChangesOperation/recordZoneFetchResultBlock“ property with a change token after each request. The default value is <doc://com.apple.documentation/documentation/swift/true>.

func (*CKFetchRecordZoneChangesOperation) FetchRecordZoneChangesCompletionBlock

func (o *CKFetchRecordZoneChangesOperation) FetchRecordZoneChangesCompletionBlock() objc.Block

The closure to execute when the operation finishes. The closure has no return value and takes the following parameter: - An error object that contains information about a problem, or `nil` if CloudKit successfully retrieves the record zone changes. This closure executes only once, and represents your final opportunity to process the results. The closure executes serially with respect to the other closures of the operation. Set this property before you execute the operation or submit it to a queue.

func (*CKFetchRecordZoneChangesOperation) Init

Creates an empty fetch record zone changes operation.

func (*CKFetchRecordZoneChangesOperation) InitWithRecordZoneIDsConfigurationsByRecordZoneID

func (o *CKFetchRecordZoneChangesOperation) InitWithRecordZoneIDsConfigurationsByRecordZoneID(recordZoneIDs *foundation.NSArray[*CKRecordZoneID], configurationsByRecordZoneID *foundation.NSDictionary[*CKRecordZoneID, *CKFetchRecordZoneChangesConfiguration]) *CKFetchRecordZoneChangesOperation

Creates an operation for fetching record zone changes.

func (*CKFetchRecordZoneChangesOperation) InitWithRecordZoneIDsOptionsByRecordZoneID

func (o *CKFetchRecordZoneChangesOperation) InitWithRecordZoneIDsOptionsByRecordZoneID(recordZoneIDs *foundation.NSArray[*CKRecordZoneID], optionsByRecordZoneID *foundation.NSDictionary[*CKRecordZoneID, *CKFetchRecordZoneChangesOptions]) *CKFetchRecordZoneChangesOperation

Creates an operation for fetching record zone changes. @DeprecationSummary { Use “CKFetchRecordZoneChangesOperation/init(recordZoneIDs:configurationsByRecordZoneID:)“ instead. } - Parameters: - recordZoneIDs: The IDs of the record zones that you want to query for changes. - optionsByRecordZoneID: A dictionary that maps record zone IDs to their corresponding options. You can specify `nil` for this parameter. CloudKit configures the operation for retrieving all of the record zones that you specify. If you want to reduce the amount of data that CloudKit returns, provide zone options for each record zone. Deprecated: since macOS 10.14.

func (*CKFetchRecordZoneChangesOperation) OptionsByRecordZoneID

Configuration options for each record zone that the operation retrieves. @DeprecationSummary { Use “CKFetchRecordZoneChangesOperation/configurationsByRecordZoneID“ instead. } You can associate each record zone ID with options that define what CloudKit fetches for that record zone. See “CKFetchRecordZoneChangesOperation/ZoneOptions“ for more information. Deprecated: since macOS 10.14.

func (*CKFetchRecordZoneChangesOperation) RecordChangedBlock

func (o *CKFetchRecordZoneChangesOperation) RecordChangedBlock() objc.Block

The closure to execute with the contents of a changed record. The closure returns no value and takes the following parameter: - The changed record. If you specify a value for the “CKFetchRecordZoneChangesConfiguration/desiredKeys“ property, the record contains only the corresponding fields. The operation executes this closure once for each record in the record zone with changes since the previous fetch request. Each time the closure executes, it executes serially with respect to the other closures of the operation. If there aren't any record changes, this closure doesn't execute. Set this property before you execute the operation or submit it to a queue. Deprecated: Use recordWasChangedBlock instead, which surfaces per-record errors

func (*CKFetchRecordZoneChangesOperation) RecordWasChangedBlock

func (o *CKFetchRecordZoneChangesOperation) RecordWasChangedBlock() objc.Block

The closure to execute with the results of retrieving a record change. The closure returns no value and takes the following parameters: - The ID of the changed record to retrieve. - The changed record, or `nil` if CloudKit can't retrieve the record. If you specify a value for the “CKFetchRecordZoneChangesConfiguration/desiredKeys“ property, the record contains only the corresponding fields. - An error that contains information about a problem, or `nil` if CloudKit retrieves the record successfully. The operation executes this closure once for each record in the record zone with changes since the previous fetch request. Each time the closure executes, it executes serially with respect to the other closures of the operation. If there aren't any record changes, this closure doesn't execute. Set this property before you execute the operation or submit it to a queue.

func (*CKFetchRecordZoneChangesOperation) RecordWithIDWasDeletedBlock

func (o *CKFetchRecordZoneChangesOperation) RecordWithIDWasDeletedBlock() objc.Block

The block to execute when a record no longer exists. The block returns no value and takes the following parameters: - term `recordID`: The deleted record's ID. - term `recordType`: The deleted record's type. The operation executes this block once for each record the server deletes after the previous change token. Each time the block executes, it executes serially with respect to the other blocks of the operation. If there aren't any record deletions, this block doesn't execute. Set this property before you execute the operation or submit it to a queue.

func (*CKFetchRecordZoneChangesOperation) RecordZoneChangeTokensUpdatedBlock

func (o *CKFetchRecordZoneChangesOperation) RecordZoneChangeTokensUpdatedBlock() objc.Block

The closure to execute when the change token updates. The closure returns no value and takes the following parameters: - The record zone's ID. - The new change token from the server. You can store this token locally and use it during subsequent fetch operations to limit the results to records that change after this operation executes. - The most recent client change token from the device. If the change token isn't the most recent change token you provided, the server might not have received the associated changes. The operation executes this closure once for each retrieved change token. Each time the closure executes, it executes serially with respect to the other blocks of the operation. Set this property before you execute the operation or submit it to a queue.

func (*CKFetchRecordZoneChangesOperation) RecordZoneFetchCompletionBlock

func (o *CKFetchRecordZoneChangesOperation) RecordZoneFetchCompletionBlock() objc.Block

The closure to execute when a record zone's fetch finishes. The closure returns no value and takes the following parameters: - The record zone's ID. - The change token to store and use in subsequent instances of “CKFetchRecordZoneChangesOperation“. - The more recent client change token from the device. If the change token isn't the more recent change token you provided, the server might not have received the associated changes. - A Boolean that indicates whether this is the final record zone change. If “CKFetchRecordZoneChangesOperation/fetchAllChanges“ is <doc://com.apple.documentation/documentation/swift/false>, it's the app's responsibility to create additional instances of “CKFetchRecordZoneChangesOperation“ to fetch further changes. - An error object that contains information about a problem, or `nil` if the operation successfully retrieves the results. The app is responsible for saving the change token at the end of the operation and providing it to future uses of “CKFetchRecordZoneChangesOperation“. Each time the closure executes, it executes serially with respect to the other closures of the operation. Set this property before you execute the operation or submit it to a queue.

func (*CKFetchRecordZoneChangesOperation) RecordZoneIDs

The IDs of the record zones that contain the records to fetch. Typically, you set the value of this property when you create the operation. If you intend to change the record zone IDs, update the value before you execute the operation or submit it to a queue.

func (*CKFetchRecordZoneChangesOperation) SetConfigurationsByRecordZoneID

func (o *CKFetchRecordZoneChangesOperation) SetConfigurationsByRecordZoneID(configurationsByRecordZoneID *foundation.NSDictionary[*CKRecordZoneID, *CKFetchRecordZoneChangesConfiguration])

func (*CKFetchRecordZoneChangesOperation) SetFetchAllChanges

func (o *CKFetchRecordZoneChangesOperation) SetFetchAllChanges(fetchAllChanges bool)

func (*CKFetchRecordZoneChangesOperation) SetFetchRecordZoneChangesCompletionBlock

func (o *CKFetchRecordZoneChangesOperation) SetFetchRecordZoneChangesCompletionBlock(fetchRecordZoneChangesCompletionBlock func(unsafe.Pointer))

func (*CKFetchRecordZoneChangesOperation) SetOptionsByRecordZoneID

func (o *CKFetchRecordZoneChangesOperation) SetOptionsByRecordZoneID(optionsByRecordZoneID *foundation.NSDictionary[*CKRecordZoneID, *CKFetchRecordZoneChangesOptions])

Configuration options for each record zone that the operation retrieves. @DeprecationSummary { Use “CKFetchRecordZoneChangesOperation/configurationsByRecordZoneID“ instead. } You can associate each record zone ID with options that define what CloudKit fetches for that record zone. See “CKFetchRecordZoneChangesOperation/ZoneOptions“ for more information. Deprecated: since macOS 10.14.

func (*CKFetchRecordZoneChangesOperation) SetRecordChangedBlock deprecated

func (o *CKFetchRecordZoneChangesOperation) SetRecordChangedBlock(recordChangedBlock func(*CKRecord))

Deprecated: Use recordWasChangedBlock instead, which surfaces per-record errors

func (*CKFetchRecordZoneChangesOperation) SetRecordWasChangedBlock

func (o *CKFetchRecordZoneChangesOperation) SetRecordWasChangedBlock(recordWasChangedBlock func(*CKRecordID, *CKRecord, unsafe.Pointer))

func (*CKFetchRecordZoneChangesOperation) SetRecordWithIDWasDeletedBlock

func (o *CKFetchRecordZoneChangesOperation) SetRecordWithIDWasDeletedBlock(recordWithIDWasDeletedBlock func(*CKRecordID, *foundation.NSString))

func (*CKFetchRecordZoneChangesOperation) SetRecordZoneChangeTokensUpdatedBlock

func (o *CKFetchRecordZoneChangesOperation) SetRecordZoneChangeTokensUpdatedBlock(recordZoneChangeTokensUpdatedBlock func(*CKRecordZoneID, *CKServerChangeToken, *foundation.NSData))

func (*CKFetchRecordZoneChangesOperation) SetRecordZoneFetchCompletionBlock

func (o *CKFetchRecordZoneChangesOperation) SetRecordZoneFetchCompletionBlock(recordZoneFetchCompletionBlock func(*CKRecordZoneID, *CKServerChangeToken, *foundation.NSData, bool, unsafe.Pointer))

func (*CKFetchRecordZoneChangesOperation) SetRecordZoneIDs

func (o *CKFetchRecordZoneChangesOperation) SetRecordZoneIDs(recordZoneIDs *foundation.NSArray[*CKRecordZoneID])

type CKFetchRecordZoneChangesOptions

type CKFetchRecordZoneChangesOptions struct {
	foundation.NSObject
}

A configuration object that describes the information to fetch from a record zone.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchrecordzonechangesoptions Deprecated: since macOS 10.14.

func CKFetchRecordZoneChangesOptionsFromID

func CKFetchRecordZoneChangesOptionsFromID(id objc.ID) *CKFetchRecordZoneChangesOptions

func (*CKFetchRecordZoneChangesOptions) DesiredKeys

The fields to fetch for the requested records. Use this property to limit the amount of data that CloudKit retrieves for each record during the fetch operation. This property contains an array of strings, each of which is the name of a field from the target records. When you retrieve a record, CloudKit only includes fields with names that match one of the keys in this property. The default value is `nil`, which causes CloudKit to fetch all of the record's keys. Because you can fetch records of different types, configure the array to include the merged set of all field names for the requested records and at least one field name from each record type. If you intend to specify the desired set of keys, set the value of this property before executing the operation or submitting it to a queue.

func (*CKFetchRecordZoneChangesOptions) PreviousServerChangeToken

func (o *CKFetchRecordZoneChangesOptions) PreviousServerChangeToken() *CKServerChangeToken

The token that identifies the starting point for retrieving changes. Each fetch request returns a unique token in addition to any changes. CloudKit passes the token to your “CKFetchRecordZoneChangesOperation/recordZoneFetchCompletionBlock“ handler. During a subsequent fetch request, providing the previous token causes the server to return only the changes since the previous fetch request. Tokens are opaque values that you can write to disk safely and reuse later.

func (*CKFetchRecordZoneChangesOptions) ResultsLimit

func (o *CKFetchRecordZoneChangesOptions) ResultsLimit() uint

The maximum number of records to fetch from the record zone. Use this property to limit the number of results in situations where you expect a large number of records. The default value is 0, which causes the server to return an appropriate number of records using dynamic conditions. When the number of records that CloudKit returns exceeds this limit, the operation sets the `moreComing` property to <doc://com.apple.documentation/documentation/swift/true> when executing the “CKFetchRecordZoneChangesOperation/recordZoneFetchCompletionBlock“ handler.

func (*CKFetchRecordZoneChangesOptions) SetDesiredKeys

func (o *CKFetchRecordZoneChangesOptions) SetDesiredKeys(desiredKeys *foundation.NSArray[*foundation.NSString])

func (*CKFetchRecordZoneChangesOptions) SetPreviousServerChangeToken

func (o *CKFetchRecordZoneChangesOptions) SetPreviousServerChangeToken(previousServerChangeToken *CKServerChangeToken)

func (*CKFetchRecordZoneChangesOptions) SetResultsLimit

func (o *CKFetchRecordZoneChangesOptions) SetResultsLimit(resultsLimit uint)

type CKFetchRecordZonesOperation

type CKFetchRecordZonesOperation struct {
	CKDatabaseOperation
}

An operation for retrieving record zones from a database.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchrecordzonesoperation

func CKFetchRecordZonesOperationFetchAllRecordZonesOperation

func CKFetchRecordZonesOperationFetchAllRecordZonesOperation() *CKFetchRecordZonesOperation

Returns an operation for fetching all record zones in the current database.

func CKFetchRecordZonesOperationFromID

func CKFetchRecordZonesOperationFromID(id objc.ID) *CKFetchRecordZonesOperation

func (*CKFetchRecordZonesOperation) FetchRecordZonesCompletionBlock

func (o *CKFetchRecordZonesOperation) FetchRecordZonesCompletionBlock() objc.Block

The closure to execute after CloudKit retrieves all of the record zones. This property is a closure that returns no value and has the following parameters: - A dictionary that maps the zone IDs you request to the results. The keys in the dictionary are “CKRecordZone/ID“ objects, and the values are the corresponding “CKRecordZone“ objects that CloudKit returns. - If CloudKit can't retrieve any of the record zones, an error that provides information about the failure; otherwise, `nil`. The operation executes the closure only once, and it's your only chance to process the results. You must provide a closure capable of executing on a background thread, so any tasks that require access to the main thread must redirect accordingly. The closure reports an error of type “CKError/Code/partialFailure“ when it retrieves only some of the record zones successfully. The <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary of the error contains a “CKPartialErrorsByItemIDKey“ key that has a dictionary as its value. The keys of the dictionary are the IDs of the record zones that the operation can't retrieve, and the corresponding values are errors that contain information about the failures. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKFetchRecordZonesOperation) Init

Creates an empty fetch zones operation.

func (*CKFetchRecordZonesOperation) InitWithRecordZoneIDs

Creates an operation for fetching the specified record zones.

func (*CKFetchRecordZonesOperation) PerRecordZoneCompletionBlock

func (o *CKFetchRecordZonesOperation) PerRecordZoneCompletionBlock() objc.Block

The closure to execute as the operation fetches individual record zones. The closure returns no value and takes the following parameters: - The ID of the record zone. - The record zone, or `nil` if CloudKit can't fetch the record zone. - If CloudKit can't fetch the record zone, this parameter provides information about the failure; otherwise, it's `nil`. The operation executes this closure once for each record zone ID in the “CKFetchRecordZonesOperation/recordZoneIDs“ property. Each time the closure executes, it executes serially with respect to the other closures of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKFetchRecordZonesOperation) RecordZoneIDs

The IDs of the record zones to retrieve. Use this property to view or change the IDs of the record zones you want to retrieve. If you intend to change the value of this property, do so before you execute the operation or submit the operation to a queue. If you use the operation that “CKFetchRecordZonesOperation/fetchAllRecordZonesOperation()“ returns, CloudKit ignores the contents of this property and sets its value to `nil`.

func (*CKFetchRecordZonesOperation) SetFetchRecordZonesCompletionBlock

func (o *CKFetchRecordZonesOperation) SetFetchRecordZonesCompletionBlock(fetchRecordZonesCompletionBlock func(*foundation.NSDictionary[*CKRecordZoneID, *CKRecordZone], unsafe.Pointer))

func (*CKFetchRecordZonesOperation) SetPerRecordZoneCompletionBlock

func (o *CKFetchRecordZonesOperation) SetPerRecordZoneCompletionBlock(perRecordZoneCompletionBlock func(*CKRecordZoneID, *CKRecordZone, unsafe.Pointer))

func (*CKFetchRecordZonesOperation) SetRecordZoneIDs

func (o *CKFetchRecordZonesOperation) SetRecordZoneIDs(recordZoneIDs *foundation.NSArray[*CKRecordZoneID])

type CKFetchRecordsOperation

type CKFetchRecordsOperation struct {
	CKDatabaseOperation
}

An operation for retrieving records from a database.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchrecordsoperation

func CKFetchRecordsOperationFetchCurrentUserRecordOperation

func CKFetchRecordsOperationFetchCurrentUserRecordOperation() *CKFetchRecordsOperation

Returns a fetch operation for retrieving the current user record.

func CKFetchRecordsOperationFromID

func CKFetchRecordsOperationFromID(id objc.ID) *CKFetchRecordsOperation

func (*CKFetchRecordsOperation) DesiredKeys

The fields of the records to fetch. Use this property to limit the amount of data that CloudKit returns for each record during the fetch operation. When CloudKit returns a record, it only includes fields with names that match one of the keys in this property. The property's default value is `nil`, which instructs CloudKit to return all of a record's keys. If you're retrieving records of different types, make sure the array includes the fields you want from all of the various record types that the operation can return. If you intend to specify a value other than `nil`, do so before you execute the operation or add the operation to a queue.

func (*CKFetchRecordsOperation) FetchRecordsCompletionBlock

func (o *CKFetchRecordsOperation) FetchRecordsCompletionBlock() objc.Block

The closure to execute after CloudKit retrieves all of the records. This property is a closure that returns no value and has the following parameters: - A dictionary that contains the records that CloudKit retrieves. Each key in the dictionary is a “CKRecord/ID“ object that corresponds to a record you request. The value of each key is the actual “CKRecord“ object that CloudKit returns. - If CloudKit can't retrieve any of the records, an error that provides information about the failure; otherwise, `nil`. The fetch operation executes this closure only once, and it's your final opportunity to process the results. The closure executes after all of the individual progress closures, but before the operation's completion closure. The closure executes serially with respect to the other progress closures of the operation. The closure reports an error of type “CKError/Code/partialFailure“ when it retrieves only some of the records successfully. The <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary of the error contains a “CKPartialErrorsByItemIDKey“ key that has a dictionary as its value. The keys of the dictionary are the IDs of the records that the operation can't retrieve, and the corresponding values are errors that contain information about the failures. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKFetchRecordsOperation) Init

Creates an empty fetch operation.

func (*CKFetchRecordsOperation) InitWithRecordIDs

func (o *CKFetchRecordsOperation) InitWithRecordIDs(recordIDs *foundation.NSArray[*CKRecordID]) *CKFetchRecordsOperation

Creates a fetch operation for retrieving the records with the specified IDs.

func (*CKFetchRecordsOperation) PerRecordCompletionBlock

func (o *CKFetchRecordsOperation) PerRecordCompletionBlock() objc.Block

The closure to execute when a record becomes available. This property is a closure that returns no value and has the following parameters: - The record, or `nil` if CloudKit can't retrieve the record. - The ID of the record. - If CloudKit can't retrieve the record, an error that provides information about the failure; otherwise, `nil`. The fetch operation executes this closure once for each record ID in the “CKFetchRecordsOperation/recordIDs“ property. Each time the closure executes, it executes serially with respect to the other progress closures of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKFetchRecordsOperation) PerRecordProgressBlock

func (o *CKFetchRecordsOperation) PerRecordProgressBlock() objc.Block

The closure to execute with progress information for individual records. This property is a closure that returns no value and has the following parameters: - The ID of the record to retrieve. - The amount of data, as a percentage, that CloudKit downloads for the record. The range is `0.0` to `1.0`, where `0.0` indicates that CloudKit hasn't downloaded anything, and `1.0` means the download is complete. The fetch operation executes this closure one or more times for each record ID in the “CKFetchRecordsOperation/recordIDs“ property. Each time the closure executes, it executes serially with respect to the other progress closures of the operation. You can use this closure to track the ongoing progress of the download operation. If you intend to use this closure to process results, set it before you execute the operation or add the operation to a queue.

func (*CKFetchRecordsOperation) RecordIDs

The record IDs of the records to fetch. Use this property to view or change the IDs of the records you want to retrieve. If you use the operation that “CKFetchRecordsOperation/fetchCurrentUserRecordOperation()“ returns, CloudKit ignores the contents of this property and sets its value to `nil`. If you intend to specify a value other than `nil`, do so before you execute the operation or add the operation to a queue. The records you fetch don't need to be in the same record zone. The record ID for each record provides the zone information that CloudKit needs to fetch the corresponding record.

func (*CKFetchRecordsOperation) SetDesiredKeys

func (o *CKFetchRecordsOperation) SetDesiredKeys(desiredKeys *foundation.NSArray[*foundation.NSString])

func (*CKFetchRecordsOperation) SetFetchRecordsCompletionBlock

func (o *CKFetchRecordsOperation) SetFetchRecordsCompletionBlock(fetchRecordsCompletionBlock func(*foundation.NSDictionary[*CKRecordID, *CKRecord], unsafe.Pointer))

func (*CKFetchRecordsOperation) SetPerRecordCompletionBlock

func (o *CKFetchRecordsOperation) SetPerRecordCompletionBlock(perRecordCompletionBlock func(*CKRecord, *CKRecordID, unsafe.Pointer))

func (*CKFetchRecordsOperation) SetPerRecordProgressBlock

func (o *CKFetchRecordsOperation) SetPerRecordProgressBlock(perRecordProgressBlock func(*CKRecordID, float64))

func (*CKFetchRecordsOperation) SetRecordIDs

func (o *CKFetchRecordsOperation) SetRecordIDs(recordIDs *foundation.NSArray[*CKRecordID])

type CKFetchShareMetadataOperation

type CKFetchShareMetadataOperation struct {
	CKOperation
}

An operation that fetches metadata for one or more shares.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchsharemetadataoperation

func CKFetchShareMetadataOperationFromID

func CKFetchShareMetadataOperationFromID(id objc.ID) *CKFetchShareMetadataOperation

func (*CKFetchShareMetadataOperation) FetchShareMetadataCompletionBlock

func (o *CKFetchShareMetadataOperation) FetchShareMetadataCompletionBlock() objc.Block

The closure to execute when the operation finishes. The closure returns no value and takes the following parameter: - An error that contains information about a problem, or `nil` if CloudKit successfully fetches the metadatas. The operation executes this closure only once. The closure executes on a background queue, so any tasks that require access to the main queue must dispatch accordingly. The closure reports an error of type “CKError/Code/partialFailure“ when it can't fetch some of the metadatas. The `userInfo` dictionary of the error contains a “CKPartialErrorsByItemIDKey“ key that has a dictionary as its value. The keys of the dictionary identify the metadatas that CloudKit can't fetch, and the corresponding values are errors that contain information about the failures. Set this property's value before you execute the operation or submit it to a queue.

func (*CKFetchShareMetadataOperation) Init

Creates an empty fetch share metadata operation.

func (*CKFetchShareMetadataOperation) InitWithShareURLs

Creates an operation for fetching the metadata for the specified shares.

func (*CKFetchShareMetadataOperation) PerShareMetadataBlock

func (o *CKFetchShareMetadataOperation) PerShareMetadataBlock() objc.Block

The closure to execute as the operation fetches individual shares. The closure returns no value and takes the following parameters: - The share's URL. - The share metadata, or `nil` if CloudKit can't fetch the metadata. - If CloudKit can't fetch the share metadata, this parameter provides information about the failure; otherwise, it's `nil`. The operation executes this closure once for each URL in the “CKFetchShareMetadataOperation/shareURLs“ property. Each time the closure executes, it executes serially with respect to the other closures of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKFetchShareMetadataOperation) RootRecordDesiredKeys

func (o *CKFetchShareMetadataOperation) RootRecordDesiredKeys() *foundation.NSArray[*foundation.NSString]

The fields to return when fetching the root record. For a shared record hierarchy, and when “CKFetchShareMetadataOperation/shouldFetchRootRecord“ is <doc://com.apple.documentation/documentation/swift/true>, set this property to specify which of the root record's fields the operation fetches. Use `nil` to fetch the entire record. CloudKit ignores this property for a shared record zone because, unlike a hierarchy, it doesn't have a nominated root record. The default value is `nil`.

func (*CKFetchShareMetadataOperation) SetFetchShareMetadataCompletionBlock

func (o *CKFetchShareMetadataOperation) SetFetchShareMetadataCompletionBlock(fetchShareMetadataCompletionBlock func(unsafe.Pointer))

func (*CKFetchShareMetadataOperation) SetPerShareMetadataBlock

func (o *CKFetchShareMetadataOperation) SetPerShareMetadataBlock(perShareMetadataBlock func(*foundation.NSURL, *CKShareMetadata, unsafe.Pointer))

func (*CKFetchShareMetadataOperation) SetRootRecordDesiredKeys

func (o *CKFetchShareMetadataOperation) SetRootRecordDesiredKeys(rootRecordDesiredKeys *foundation.NSArray[*foundation.NSString])

func (*CKFetchShareMetadataOperation) SetShareURLs

func (o *CKFetchShareMetadataOperation) SetShareURLs(shareURLs *foundation.NSArray[*foundation.NSURL])

func (*CKFetchShareMetadataOperation) SetShouldFetchRootRecord

func (o *CKFetchShareMetadataOperation) SetShouldFetchRootRecord(shouldFetchRootRecord bool)

func (*CKFetchShareMetadataOperation) ShareURLs

The URLs of the shares to fetch. Use this property to view or change the URLs of the shares to fetch. If you intend to specify or change this property's value, do so before you execute the operation or submit it to a queue.

func (*CKFetchShareMetadataOperation) ShouldFetchRootRecord

func (o *CKFetchShareMetadataOperation) ShouldFetchRootRecord() bool

A Boolean value that indicates whether to retrieve the root record. For a shared record hierarchy, set this property to <doc://com.apple.documentation/documentation/swift/true> to include the root record in the fetched share metadata. CloudKit ignores this property for a shared record zone because, unlike a shared record hierarchy, it doesn't have a nominated root record. The default value is <doc://com.apple.documentation/documentation/swift/false>.

type CKFetchShareParticipantsOperation

type CKFetchShareParticipantsOperation struct {
	CKOperation
}

An operation that converts user identities into share participants.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchshareparticipantsoperation

func CKFetchShareParticipantsOperationFromID

func CKFetchShareParticipantsOperationFromID(id objc.ID) *CKFetchShareParticipantsOperation

func (*CKFetchShareParticipantsOperation) FetchShareParticipantsCompletionBlock

func (o *CKFetchShareParticipantsOperation) FetchShareParticipantsCompletionBlock() objc.Block

The closure to execute when the operation finishes. The closure returns no value and takes the following parameter: - An error that contains information about a problem, or `nil` if CloudKit successfully generates the participants. The operation executes this closure only once. The closure executes on a background queue, so any tasks that require access to the main queue must dispatch accordingly. The closure reports an error of type “CKError/Code/partialFailure“ when it can't generate some of the participants. The `userInfo` dictionary of the error contains a “CKPartialErrorsByItemIDKey“ key that has a dictionary as its value. The keys of the dictionary identify the participants that CloudKit can't generate, and the corresponding values are errors that contain information about the failures. Set this property's value before you execute the operation or submit it to a queue.

func (*CKFetchShareParticipantsOperation) Init

Creates an empty operation.

func (*CKFetchShareParticipantsOperation) InitWithUserIdentityLookupInfos

func (o *CKFetchShareParticipantsOperation) InitWithUserIdentityLookupInfos(userIdentityLookupInfos *foundation.NSArray[*CKUserIdentityLookupInfo]) *CKFetchShareParticipantsOperation

Creates an operation for generating share participants from the specified user data.

func (*CKFetchShareParticipantsOperation) PerShareParticipantCompletionBlock

func (o *CKFetchShareParticipantsOperation) PerShareParticipantCompletionBlock() objc.Block

The closure to execute as the operation generates individual participants. The closure returns no value and takes the following parameters: - The lookup info of the share participant. - The generated share participant, or `nil` if CloudKit can't generate the share participant. - If CloudKit can't generate the share participant, this parameter provides information about the failure; otherwise, it's `nil`. The operation executes this closure once for each item of user data in the “CKFetchShareParticipantsOperation/userIdentityLookupInfos“ property. Each time the closure executes, it executes serially with respect to the other closures of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKFetchShareParticipantsOperation) SetFetchShareParticipantsCompletionBlock

func (o *CKFetchShareParticipantsOperation) SetFetchShareParticipantsCompletionBlock(fetchShareParticipantsCompletionBlock func(unsafe.Pointer))

func (*CKFetchShareParticipantsOperation) SetPerShareParticipantCompletionBlock

func (o *CKFetchShareParticipantsOperation) SetPerShareParticipantCompletionBlock(perShareParticipantCompletionBlock func(*CKUserIdentityLookupInfo, *CKShareParticipant, unsafe.Pointer))

func (*CKFetchShareParticipantsOperation) SetShareParticipantFetchedBlock deprecated

func (o *CKFetchShareParticipantsOperation) SetShareParticipantFetchedBlock(shareParticipantFetchedBlock func(*CKShareParticipant))

Deprecated: Use perShareParticipantCompletionBlock instead, which surfaces per-share-participant errors

func (*CKFetchShareParticipantsOperation) SetUserIdentityLookupInfos

func (o *CKFetchShareParticipantsOperation) SetUserIdentityLookupInfos(userIdentityLookupInfos *foundation.NSArray[*CKUserIdentityLookupInfo])

func (*CKFetchShareParticipantsOperation) ShareParticipantFetchedBlock

func (o *CKFetchShareParticipantsOperation) ShareParticipantFetchedBlock() objc.Block

The closure to execute as the operation generates individual participants. The closure returns no value and takes the following parameters: - The participant that the operation generates. The operation executes this closure once for each item of user data in the “CKFetchShareParticipantsOperation/userIdentityLookupInfos“ property. Each time the closure executes, it executes serially with respect to the other closures of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue. Deprecated: Use perShareParticipantCompletionBlock instead, which surfaces per-share-participant errors

func (*CKFetchShareParticipantsOperation) UserIdentityLookupInfos

The user data for the participants. Use this property to view or change the participants user data. If you intend to specify or change the value of this property, do so before you execute the operation or submit it to a queue. - Note: If you don't set “CKFetchShareParticipantsOperation/userIdentityLookupInfos“ prior to executing the operation, it returns immediately with no results.

type CKFetchSubscriptionsOperation

type CKFetchSubscriptionsOperation struct {
	CKDatabaseOperation
}

An operation for fetching subscriptions.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchsubscriptionsoperation

func CKFetchSubscriptionsOperationFetchAllSubscriptionsOperation

func CKFetchSubscriptionsOperationFetchAllSubscriptionsOperation() *CKFetchSubscriptionsOperation

Returns an operation that fetches all of the user’s subscriptions.

func CKFetchSubscriptionsOperationFromID

func CKFetchSubscriptionsOperationFromID(id objc.ID) *CKFetchSubscriptionsOperation

func (*CKFetchSubscriptionsOperation) FetchSubscriptionCompletionBlock

func (o *CKFetchSubscriptionsOperation) FetchSubscriptionCompletionBlock() objc.Block

The block to execute after the operation fetches the subscriptions. The block returns no value and takes the following parameters: - term `subscriptionsBySubscriptionID`: A dictionary with keys that are the IDs of the subscriptions you request, and values that are the corresponding subscriptions. - term `operationError`: An error that contains information about a problem, or `nil` if the system successfully fetches the subscriptions. The operation executes this block only once, and it's your only opportunity to process the results. The block executes on a background queue, so any tasks that require access to the main queue must dispatch accordingly. The block reports an error of type “CKError/Code/partialFailure“ when it retrieves only some of the subscriptions successfully. The <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary of the error contains a “CKPartialErrorsByItemIDKey“ key that has a dictionary as its value. The keys of the dictionary are the IDs of the subscriptions that the operation can't fetch, and the corresponding values are errors that contain information about the failures. Set this property's value before you execute the operation or submit it to a queue.

func (*CKFetchSubscriptionsOperation) Init

Creates an empty fetch subscriptions operation.

func (*CKFetchSubscriptionsOperation) InitWithSubscriptionIDs

func (o *CKFetchSubscriptionsOperation) InitWithSubscriptionIDs(subscriptionIDs *foundation.NSArray[*foundation.NSString]) *CKFetchSubscriptionsOperation

Creates an operation for fetching the specified subscriptions.

func (*CKFetchSubscriptionsOperation) PerSubscriptionCompletionBlock

func (o *CKFetchSubscriptionsOperation) PerSubscriptionCompletionBlock() objc.Block

The closure to execute as the operation fetches individual subscriptions. The closure returns no value and takes the following parameters: - The ID of the subscription. - The subscription, or `nil` if CloudKit can't fetch the subscription. - If CloudKit can't fetch the subscription, this parameter provides information about the failure; otherwise, it's `nil`. The operation executes this closure once for each subscription ID in the “CKFetchSubscriptionsOperation/subscriptionIDs-714ct“ property. Each time the closure executes, it executes serially with respect to the other closures of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKFetchSubscriptionsOperation) SetFetchSubscriptionCompletionBlock

func (o *CKFetchSubscriptionsOperation) SetFetchSubscriptionCompletionBlock(fetchSubscriptionCompletionBlock func(*foundation.NSDictionary[*foundation.NSString, *CKSubscription], unsafe.Pointer))

func (*CKFetchSubscriptionsOperation) SetPerSubscriptionCompletionBlock

func (o *CKFetchSubscriptionsOperation) SetPerSubscriptionCompletionBlock(perSubscriptionCompletionBlock func(*foundation.NSString, *CKSubscription, unsafe.Pointer))

func (*CKFetchSubscriptionsOperation) SetSubscriptionIDs

func (o *CKFetchSubscriptionsOperation) SetSubscriptionIDs(subscriptionIDs *foundation.NSArray[*foundation.NSString])

func (*CKFetchSubscriptionsOperation) SubscriptionIDs

The IDs of the subscriptions to fetch. Use this property to view or change the IDs of the subscriptions to fetch. Each element of the array is a string that represents the ID of a subscription. If you intend to modify this property's value, do so before you execute the operation or submit it to a queue. If you use the “CKFetchSubscriptionsOperation/fetchAllSubscriptionsOperation()“ method to create the operation, CloudKit ignores this property's value and sets it to `nil`.

type CKFetchWebAuthTokenOperation

type CKFetchWebAuthTokenOperation struct {
	CKDatabaseOperation
}

An operation that creates an authentication token for use with CloudKit web services.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckfetchwebauthtokenoperation

func CKFetchWebAuthTokenOperationFromID

func CKFetchWebAuthTokenOperationFromID(id objc.ID) *CKFetchWebAuthTokenOperation

func (*CKFetchWebAuthTokenOperation) APIToken

The API token that allows access to an app's container.

func (*CKFetchWebAuthTokenOperation) FetchWebAuthTokenCompletionBlock

func (o *CKFetchWebAuthTokenOperation) FetchWebAuthTokenCompletionBlock() objc.Block

The block to execute when the operation finishes. The closure returns no value and takes the following parameters: - If the operation is successful, the web authentication token; otherwise, `nil`. - An error that contains information about a problem, or `nil` if the system successfully fetches the token. The operation executes this closure only once. You must provide a closure capable of executing on a background thread, so any tasks that require access to the main thread must dispatch accordingly.

func (*CKFetchWebAuthTokenOperation) Init

Creates an empty fetch operation.

func (*CKFetchWebAuthTokenOperation) InitWithAPIToken

Creates a fetch operation for the specified API token.

func (*CKFetchWebAuthTokenOperation) SetAPIToken

func (o *CKFetchWebAuthTokenOperation) SetAPIToken(aPIToken *foundation.NSString)

func (*CKFetchWebAuthTokenOperation) SetFetchWebAuthTokenCompletionBlock

func (o *CKFetchWebAuthTokenOperation) SetFetchWebAuthTokenCompletionBlock(fetchWebAuthTokenCompletionBlock func(*foundation.NSString, unsafe.Pointer))

type CKLocationSortDescriptor

type CKLocationSortDescriptor struct {
	foundation.NSSortDescriptor
}

An object for sorting records that contain location data.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cklocationsortdescriptor

func CKLocationSortDescriptorFromID

func CKLocationSortDescriptorFromID(id objc.ID) *CKLocationSortDescriptor

func (*CKLocationSortDescriptor) InitWithCoder

Creates a location sort descriptor from a serialized instance.

func (*CKLocationSortDescriptor) InitWithKeyRelativeLocation

func (o *CKLocationSortDescriptor) InitWithKeyRelativeLocation(key *foundation.NSString, relativeLocation unsafe.Pointer) *CKLocationSortDescriptor

Creates a location sort descriptor using the specified key and relative location.

func (*CKLocationSortDescriptor) RelativeLocation

func (o *CKLocationSortDescriptor) RelativeLocation() unsafe.Pointer

type CKModifyRecordZonesOperation

type CKModifyRecordZonesOperation struct {
	CKDatabaseOperation
}

An operation that modifies one or more record zones.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckmodifyrecordzonesoperation

func CKModifyRecordZonesOperationFromID

func CKModifyRecordZonesOperationFromID(id objc.ID) *CKModifyRecordZonesOperation

func (*CKModifyRecordZonesOperation) Init

Creates an empty modify record zones operation.

func (*CKModifyRecordZonesOperation) InitWithRecordZonesToSaveRecordZoneIDsToDelete

func (o *CKModifyRecordZonesOperation) InitWithRecordZonesToSaveRecordZoneIDsToDelete(recordZonesToSave *foundation.NSArray[*CKRecordZone], recordZoneIDsToDelete *foundation.NSArray[*CKRecordZoneID]) *CKModifyRecordZonesOperation

Creates an operation for modifying the specified record zones.

func (*CKModifyRecordZonesOperation) ModifyRecordZonesCompletionBlock

func (o *CKModifyRecordZonesOperation) ModifyRecordZonesCompletionBlock() objc.Block

The closure to execute after CloudKit modifies all of the record zones. This property is a closure that returns no value and has the following parameters: - The record zones that CloudKit saves. - The IDs of the record zones that CloudKit deletes. - If CloudKit can't modify any of the record zones, this parameter provides information about the failure; otherwise, it's `nil`. The closure executes once, and represents your only opportunity to process the results. The closure reports an error of type “CKError/Code/partialFailure“ when it modifies only some of the record zones successfully. The <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary of the error contains a “CKPartialErrorsByItemIDKey“ key that has a dictionary as its value. The keys of the dictionary are the IDs of the record zones that the operation can't modify, and the corresponding values are errors that contain information about the failures. If you intend to use this closure to process the results, set it before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordZonesOperation) PerRecordZoneDeleteBlock

func (o *CKModifyRecordZonesOperation) PerRecordZoneDeleteBlock() objc.Block

The closure to execute when CloudKit deletes a record zone. This property is a closure that returns no value and has the following parameters: - The ID of the record zone that CloudKit deletes. - If CloudKit can't delete the record zone, an error that provides information about the failure; otherwise, `nil`. The closure executes once for each record zone in the “CKModifyRecordZonesOperation/recordZoneIDsToDelete“ property. Each time the closure executes, it executes serially with respect to the other record zone completion blocks of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordZonesOperation) PerRecordZoneSaveBlock

func (o *CKModifyRecordZonesOperation) PerRecordZoneSaveBlock() objc.Block

The closure to execute when CloudKit saves a record zone. This property is a closure that returns no value and has the following parameters: - The ID of the record zone that CloudKit saves. - The record zone that CloudKit saves, or `nil` if CloudKit can't save the record zone. - If CloudKit can't save the record zone, an error that provides information about the failure; otherwise, `nil`. The closure executes once for each record zone in the “CKModifyRecordZonesOperation/recordZonesToSave“ property. Each time the closure executes, it executes serially with respect to the other record zone completion blocks of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordZonesOperation) RecordZoneIDsToDelete

func (o *CKModifyRecordZonesOperation) RecordZoneIDsToDelete() *foundation.NSArray[*CKRecordZoneID]

The IDs of the record zones to delete permanently from the database. The initial value of the property is the array of zone IDs that you provide to the “CKModifyRecordZonesOperation/init(recordZonesToSave:recordZoneIDsToDelete:)“ method. You can modify this array as necessary before you execute the operation. The record zones must all target the same database. You can specify `nil`, or an empty array, for this property. If you intend to change the value of this property, do so before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordZonesOperation) RecordZonesToSave

func (o *CKModifyRecordZonesOperation) RecordZonesToSave() *foundation.NSArray[*CKRecordZone]

The record zones to save to the database. The initial value of the property is the array that you provide to the “CKModifyRecordZonesOperation/init(recordZonesToSave:recordZoneIDsToDelete:)“ method. You can modify this array as necessary before you execute the operation. The record zones must all target the same database. You can specify `nil`, or an empty array, for this property. If you intend to change the value of this property, do so before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordZonesOperation) SetModifyRecordZonesCompletionBlock

func (o *CKModifyRecordZonesOperation) SetModifyRecordZonesCompletionBlock(modifyRecordZonesCompletionBlock func(*foundation.NSArray[*CKRecordZone], *foundation.NSArray[*CKRecordZoneID], unsafe.Pointer))

func (*CKModifyRecordZonesOperation) SetPerRecordZoneDeleteBlock

func (o *CKModifyRecordZonesOperation) SetPerRecordZoneDeleteBlock(perRecordZoneDeleteBlock func(*CKRecordZoneID, unsafe.Pointer))

func (*CKModifyRecordZonesOperation) SetPerRecordZoneSaveBlock

func (o *CKModifyRecordZonesOperation) SetPerRecordZoneSaveBlock(perRecordZoneSaveBlock func(*CKRecordZoneID, *CKRecordZone, unsafe.Pointer))

func (*CKModifyRecordZonesOperation) SetRecordZoneIDsToDelete

func (o *CKModifyRecordZonesOperation) SetRecordZoneIDsToDelete(recordZoneIDsToDelete *foundation.NSArray[*CKRecordZoneID])

func (*CKModifyRecordZonesOperation) SetRecordZonesToSave

func (o *CKModifyRecordZonesOperation) SetRecordZonesToSave(recordZonesToSave *foundation.NSArray[*CKRecordZone])

type CKModifyRecordsOperation

type CKModifyRecordsOperation struct {
	CKDatabaseOperation
}

An operation that modifies one or more records.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckmodifyrecordsoperation

func CKModifyRecordsOperationFromID

func CKModifyRecordsOperationFromID(id objc.ID) *CKModifyRecordsOperation

func (*CKModifyRecordsOperation) Atomic

func (o *CKModifyRecordsOperation) Atomic() bool

A Boolean value that indicates whether the entire operation fails when CloudKit can't update one or more records in a record zone. Modifying records atomically prevents you from updating your data in a way that leaves it in an inconsistent state. You use atomic updates when you want to write multiple records to the same record zone. If there's a failure to modify any of the records in a zone, CloudKit doesn't change the other records in that same zone. The record zone must have the “CKRecordZone/Capabilities/atomic“ capability for this behavior to apply. If a record zone doesn't support the atomic capability, setting this property has no effect. The default value of this property is <doc://com.apple.documentation/documentation/swift/true>, which causes all modifications within a single record zone to occur atomically. If your operation contains records in multiple record zones, a failure in one zone doesn't prevent modifications to records in a different zone. Changing the value of this property to <doc://com.apple.documentation/documentation/swift/false> causes CloudKit to modify records individually, regardless of whether the record zone supports atomic modifications.

func (*CKModifyRecordsOperation) ClientChangeTokenData

func (o *CKModifyRecordsOperation) ClientChangeTokenData() *foundation.NSData

A token that tracks local changes to records. The default value is `nil`. When you modify records from a fetch operation, specify a token using this property to indicate which version of the record you most recently modified. Compare the token you supply to the token in the next record fetch to confirm the server successfully receives the device's most recent modify request. If you intend to change the value of this property, do so before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordsOperation) Init

Creates an empty modify records operation.

func (*CKModifyRecordsOperation) InitWithRecordsToSaveRecordIDsToDelete

func (o *CKModifyRecordsOperation) InitWithRecordsToSaveRecordIDsToDelete(records *foundation.NSArray[*CKRecord], recordIDs *foundation.NSArray[*CKRecordID]) *CKModifyRecordsOperation

Creates an operation for modifying the specified records.

func (*CKModifyRecordsOperation) ModifyRecordsCompletionBlock

func (o *CKModifyRecordsOperation) ModifyRecordsCompletionBlock() objc.Block

The closure to execute after CloudKit modifies all of the records. This property is a closure that returns no value and has the following parameters: - The records that CloudKit saves. - The IDs of the records that CloudKit deletes. - If CloudKit can't modify any of the records, this parameter provides information about the failure; otherwise, it's `nil`. The closure executes only once, and represents your final opportunity to process the operation's results. It executes after all record progress closures and record completion closures finish. The closure executes serially with respect to the other closures of the operation. Although this closure executes after the modification of records completes, it executes prior to the indexing of queries for those modified records. Therefore, if a query executes in this completion closure, the results of that query might not include the changes from this operation. Conversely, records that CloudKit fetches in the completion closure are up to date with the changes from the associated operation. The closure reports an error of type “CKError/Code/partialFailure“ when it modifies only some of the records successfully. The <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary of the error contains a “CKPartialErrorsByItemIDKey“ key that has a dictionary as its value. The keys of the dictionary are the IDs of the records that the operation can't modify, and the corresponding values are errors that contain information about the failures. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordsOperation) PerRecordCompletionBlock

func (o *CKModifyRecordsOperation) PerRecordCompletionBlock() objc.Block

The closure to execute when CloudKit saves a record. This property is a closure that returns no value and has the following parameters: - The record that CloudKit saves. - If CloudKit can't save the record, an error that provides information about the failure; otherwise, `nil`. The closure executes once for each record in the “CKModifyRecordsOperation/recordsToSave“ property. Each time the closure executes, it executes serially with respect to the other record completion blocks of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue. Deprecated: since macOS 12.0.

func (*CKModifyRecordsOperation) PerRecordDeleteBlock

func (o *CKModifyRecordsOperation) PerRecordDeleteBlock() objc.Block

The closure to execute when CloudKit deletes a record. This property is a closure that returns no value and has the following parameters: - The ID of the record that CloudKit deletes. - If CloudKit can't delete the record, an error that provides information about the failure; otherwise, `nil`. The closure executes once for each record in the “CKModifyRecordsOperation/recordIDsToDelete“ property. Each time the closure executes, it executes serially with respect to the other record completion blocks of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordsOperation) PerRecordProgressBlock

func (o *CKModifyRecordsOperation) PerRecordProgressBlock() objc.Block

The closure to execute with progress information for individual records. This property is a closure that returns no value and has the following parameters: - The record that CloudKit saves. - The amount of data, as a percentage, that CloudKit saves for the record. The range is `0.0` to `1.0`, where `0.0` indicates that CloudKit hasn't saved any data, and `1.0` means that CloudKit has saved the entire record. The modify records operation executes this closure one or more times for each record in the “CKModifyRecordsOperation/recordsToSave“ property. Each time the closure executes, it executes serially with respect to the other progress closures of the operation. You can use this closure to track the ongoing progress of the operation. If you intend to use this closure to process results, set it before you execute the operation or add the operation to a queue.

func (*CKModifyRecordsOperation) PerRecordSaveBlock

func (o *CKModifyRecordsOperation) PerRecordSaveBlock() objc.Block

The closure to execute when CloudKit saves a record. This property is a closure that returns no value and has the following parameters: - The ID of the record that CloudKit saves. - The record that CloudKit saves, or `nil` if CloudKit can't save the record. - If CloudKit can't save the record, an error that provides information about the failure; otherwise, `nil`. The closure executes once for each record in the “CKModifyRecordsOperation/recordsToSave“ property. Each time the closure executes, it executes serially with respect to the other record completion blocks of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordsOperation) RecordIDsToDelete

func (o *CKModifyRecordsOperation) RecordIDsToDelete() *foundation.NSArray[*CKRecordID]

The IDs of the records to delete permanently from the database. An array of “CKRecord/ID“ objects that identifies the records to delete. The initial value of the property is the array of record IDs that you provide to the “CKModifyRecordsOperation/init(recordsToSave:recordIDsToDelete:)“ method. When deleting records, the operation reports progress only on the records with the IDs that you specify in this property. Deleting records can trigger the deletion of related records if there is an owner-owned relationship between the records involving a “CKRecord/Reference“ object. When additional deletions occur, CloudKit doesn't pass them to the progress handler of the operation. For that reason, it's important to understand the implications of the ownership model you use when you relate records to each other through a “CKRecord/Reference“ object. For more information about owner-owned relationships, see “CKRecord/Reference“. If you intend to change the value of this property, do so before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordsOperation) RecordsToSave

func (o *CKModifyRecordsOperation) RecordsToSave() *foundation.NSArray[*CKRecord]

The records to save to the database. The initial value of the property is the array that you provide to the “CKModifyRecordsOperation/init(recordsToSave:recordIDsToDelete:)“ method. You can modify this array as necessary before you execute the operation. The records must all target the same database, but can belong to different record zones. If you intend to change the value of this property, do so before you execute the operation or submit the operation to a queue.

func (*CKModifyRecordsOperation) SavePolicy

The policy to use when saving changes to records. The server uses this property to determine how to proceed when saving record changes. The exact behavior depends on the policy you choose: - Use “CKModifyRecordsOperation/RecordSavePolicy/ifServerRecordUnchanged“ to only save a record when the change tag of the local copy matches that of the server's copy. If the server record's change tag is more recent, CloudKit discards the save and returns a “CKError/Code/serverRecordChanged“ error. - Use “CKModifyRecordsOperation/RecordSavePolicy/changedKeys“ to save only the fields of the record that contain changes. The server doesn't compare record change tags when using this policy. - Use “CKModifyRecordsOperation/RecordSavePolicy/allKeys“ to save every field of the record, even those without changes. The server doesn't compare record change tags when using this policy. If you change the property's value, do so before you execute the operation or submit the operation to a queue. The default value is “CKModifyRecordsOperation/RecordSavePolicy/ifServerRecordUnchanged“.

func (*CKModifyRecordsOperation) SetAtomic

func (o *CKModifyRecordsOperation) SetAtomic(atomic bool)

func (*CKModifyRecordsOperation) SetClientChangeTokenData

func (o *CKModifyRecordsOperation) SetClientChangeTokenData(clientChangeTokenData *foundation.NSData)

func (*CKModifyRecordsOperation) SetModifyRecordsCompletionBlock

func (o *CKModifyRecordsOperation) SetModifyRecordsCompletionBlock(modifyRecordsCompletionBlock func(*foundation.NSArray[*CKRecord], *foundation.NSArray[*CKRecordID], unsafe.Pointer))

func (*CKModifyRecordsOperation) SetPerRecordCompletionBlock deprecated

func (o *CKModifyRecordsOperation) SetPerRecordCompletionBlock(perRecordCompletionBlock func(*CKRecord, unsafe.Pointer))

Deprecated: since macOS 12.0.

func (*CKModifyRecordsOperation) SetPerRecordDeleteBlock

func (o *CKModifyRecordsOperation) SetPerRecordDeleteBlock(perRecordDeleteBlock func(*CKRecordID, unsafe.Pointer))

func (*CKModifyRecordsOperation) SetPerRecordProgressBlock

func (o *CKModifyRecordsOperation) SetPerRecordProgressBlock(perRecordProgressBlock func(*CKRecord, float64))

func (*CKModifyRecordsOperation) SetPerRecordSaveBlock

func (o *CKModifyRecordsOperation) SetPerRecordSaveBlock(perRecordSaveBlock func(*CKRecordID, *CKRecord, unsafe.Pointer))

func (*CKModifyRecordsOperation) SetRecordIDsToDelete

func (o *CKModifyRecordsOperation) SetRecordIDsToDelete(recordIDsToDelete *foundation.NSArray[*CKRecordID])

func (*CKModifyRecordsOperation) SetRecordsToSave

func (o *CKModifyRecordsOperation) SetRecordsToSave(recordsToSave *foundation.NSArray[*CKRecord])

func (*CKModifyRecordsOperation) SetSavePolicy

func (o *CKModifyRecordsOperation) SetSavePolicy(savePolicy CKRecordSavePolicy)

type CKModifySubscriptionsOperation

type CKModifySubscriptionsOperation struct {
	CKDatabaseOperation
}

An operation for modifying one or more subscriptions.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckmodifysubscriptionsoperation

func CKModifySubscriptionsOperationFromID

func CKModifySubscriptionsOperationFromID(id objc.ID) *CKModifySubscriptionsOperation

func (*CKModifySubscriptionsOperation) Init

Creates an empty modify subscriptions operation.

func (*CKModifySubscriptionsOperation) InitWithSubscriptionsToSaveSubscriptionIDsToDelete

func (o *CKModifySubscriptionsOperation) InitWithSubscriptionsToSaveSubscriptionIDsToDelete(subscriptionsToSave *foundation.NSArray[*CKSubscription], subscriptionIDsToDelete *foundation.NSArray[*foundation.NSString]) *CKModifySubscriptionsOperation

Creates an operation for saving and deleting the specified subscriptions.

func (*CKModifySubscriptionsOperation) ModifySubscriptionsCompletionBlock

func (o *CKModifySubscriptionsOperation) ModifySubscriptionsCompletionBlock() objc.Block

The block to execute after the operation modifies the subscriptions. The block returns no value and takes the following parameters: - term `savedSubscriptions`: The subscriptions to save. - term `deletedSubscriptionIDs`: The IDs of the subscriptions to delete. - term `operationError`: An error that contains information about a problem, or `nil` if CloudKit successfully modifies the subscriptions. The operation executes this block only once, and it's your only opportunity to process the results. The block executes on a background queue, so any tasks that require access to the main queue must dispatch accordingly. The block reports an error of type “CKError/Code/partialFailure“ when it can't modify some of the subscriptions. The <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary of the error contains a “CKPartialErrorsByItemIDKey“ key that has a dictionary as its value. The keys of the dictionary are the IDs of the subscriptions that CloudKit can't modify, and the corresponding values are errors that contain information about the failures. Set this property's value before you execute the operation or submit it to a queue.

func (*CKModifySubscriptionsOperation) PerSubscriptionDeleteBlock

func (o *CKModifySubscriptionsOperation) PerSubscriptionDeleteBlock() objc.Block

The closure to execute when CloudKit deletes a subscription. This property is a closure that returns no value and has the following parameters: - The ID of the subscription that CloudKit deletes. - If CloudKit can't delete the subscription, an error that provides information about the failure; otherwise, `nil`. The closure executes once for each subscription in the “CKModifySubscriptionsOperation/subscriptionIDsToDelete-14x82“ property. Each time the closure executes, it executes serially with respect to the other subscription completion blocks of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKModifySubscriptionsOperation) PerSubscriptionSaveBlock

func (o *CKModifySubscriptionsOperation) PerSubscriptionSaveBlock() objc.Block

The closure to execute when CloudKit saves a subscription. This property is a closure that returns no value and has the following parameters: - The ID of the subscription that CloudKit saves. - The subscription that CloudKit saves, or `nil` if CloudKit can't save the subscription. - If CloudKit can't save the subscription, an error that provides information about the failure; otherwise, `nil`. The closure executes once for each subscription in the “CKModifySubscriptionsOperation/subscriptionsToSave“ property. Each time the closure executes, it executes serially with respect to the other subscription completion blocks of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKModifySubscriptionsOperation) SetModifySubscriptionsCompletionBlock

func (o *CKModifySubscriptionsOperation) SetModifySubscriptionsCompletionBlock(modifySubscriptionsCompletionBlock func(*foundation.NSArray[*CKSubscription], *foundation.NSArray[*foundation.NSString], unsafe.Pointer))

func (*CKModifySubscriptionsOperation) SetPerSubscriptionDeleteBlock

func (o *CKModifySubscriptionsOperation) SetPerSubscriptionDeleteBlock(perSubscriptionDeleteBlock func(*foundation.NSString, unsafe.Pointer))

func (*CKModifySubscriptionsOperation) SetPerSubscriptionSaveBlock

func (o *CKModifySubscriptionsOperation) SetPerSubscriptionSaveBlock(perSubscriptionSaveBlock func(*foundation.NSString, *CKSubscription, unsafe.Pointer))

func (*CKModifySubscriptionsOperation) SetSubscriptionIDsToDelete

func (o *CKModifySubscriptionsOperation) SetSubscriptionIDsToDelete(subscriptionIDsToDelete *foundation.NSArray[*foundation.NSString])

func (*CKModifySubscriptionsOperation) SetSubscriptionsToSave

func (o *CKModifySubscriptionsOperation) SetSubscriptionsToSave(subscriptionsToSave *foundation.NSArray[*CKSubscription])

func (*CKModifySubscriptionsOperation) SubscriptionIDsToDelete

func (o *CKModifySubscriptionsOperation) SubscriptionIDsToDelete() *foundation.NSArray[*foundation.NSString]

The IDs of the subscriptions that you want to delete. This property contains the IDs of the subscriptions that you want to delete. Its initial value is the array that you pass to the “CKModifySubscriptionsOperation/init(subscriptionsToSave:subscriptionIDsToDelete:)“ method. Modify this property as necessary before you execute the operation or submit it to a queue.

func (*CKModifySubscriptionsOperation) SubscriptionsToSave

The subscriptions to save to the database. This property contains the subscriptions that you want to save. Its initial value is the array that you pass to the “CKModifySubscriptionsOperation/init(subscriptionsToSave:subscriptionIDsToDelete:)“ method. Modify this property as necessary before you execute the operation or submit it to a queue. After CloudKit saves the subscriptions, it begins generating push notifications according to their criteria.

type CKNotification

type CKNotification struct {
	foundation.NSObject
}

The abstract base class for CloudKit notifications.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cknotification

func CKNotificationFromID

func CKNotificationFromID(id objc.ID) *CKNotification

func CKNotificationNotificationFromRemoteNotificationDictionary

func CKNotificationNotificationFromRemoteNotificationDictionary(notificationDictionary *foundation.NSDictionary[objc.ID, objc.ID]) *CKNotification

Creates a new notification using the specified payload data.

func (*CKNotification) AlertActionLocalizationKey

func (o *CKNotification) AlertActionLocalizationKey() unsafe.Pointer

The key that identifies the localized string for the notification's action. The system uses this property's value to find the matching string in your app's `Localizable.strings` file. It uses the string as the text of the button that opens your app, which the notification alert displays. If this property's value is `nil`, the system displays a single button to dismiss the alert.

func (*CKNotification) AlertBody

func (o *CKNotification) AlertBody() unsafe.Pointer

The notification's alert body. This property contains the nonlocalized text that the notification's alert displays.

func (*CKNotification) AlertLaunchImage

func (o *CKNotification) AlertLaunchImage() unsafe.Pointer

The filename of an image to use as a launch image. The system uses this property's value to locate an image in the app's bundle, and displays it as a launch image when the user launches the app after receiving a push notification.

func (*CKNotification) AlertLocalizationArgs

func (o *CKNotification) AlertLocalizationArgs() unsafe.Pointer

The fields for building a notification's alert. This property is an array of field names that CloudKit uses to extract the corresponding values from the record that triggers the push notification. The values are strings, numbers, or dates. CloudKit may truncate strings with a length greater than 100 characters when it adds them to a notification's payload. If you use `%@` for your substitution variables, CloudKit replaces those variables by traversing the array in order. If you use variables of the form `%n$@`, where `n` is an integer, `n` represents the index (starting at 1) of the item in the array to use. So, the first item in the array replaces the variable `%1$@`, the second item replaces the variable `%2$@`, and so on. You can use indexed substitution variables to change the order of items in the resulting string, which might be necessary when you localize your app's content.

func (*CKNotification) AlertLocalizationKey

func (o *CKNotification) AlertLocalizationKey() unsafe.Pointer

The key that identifies the localized text for the alert body. When the system delivers a push notification to your app, it gets the text for the alert body by looking up the specified key in your app's `Localizable.strings` file. CloudKit ignores the value in “CKNotification/alertBody“ if you set this property.

func (*CKNotification) Badge

func (o *CKNotification) Badge() *foundation.NSNumber

The value that the app icon's badge displays.

func (*CKNotification) Category

func (o *CKNotification) Category() unsafe.Pointer

The name of the action group that corresponds to this notification. Categories allow you to present custom actions to the user on your push notifications. For more information, see <doc://com.apple.documentation/documentation/uikit/uimutableusernotificationcategory>.

func (*CKNotification) ContainerIdentifier

func (o *CKNotification) ContainerIdentifier() *foundation.NSString

The ID of the container with the content that triggers the notification. Use this property to determine the location of the changed content.

func (*CKNotification) IsPruned

func (o *CKNotification) IsPruned() bool

A Boolean value that indicates whether the system removes some push notification content before delivery. The server may truncate the payload data of a push notification if the size of that data exceeds the allowed maximum. For notifications you create using a payload dictionary, the value of this property is <doc://com.apple.documentation/documentation/swift/true> if the payload data doesn't contain all information regarding the change. The value is <doc://com.apple.documentation/documentation/swift/false> if the payload data is complete. For notifications you fetch from the database using a `CKFetchNotificationChangesOperation` operation, this property's value is always <doc://com.apple.documentation/documentation/swift/true>. When CloudKit must remove payload data, it removes it in a specific order. This class's properties are among the last that CloudKit removes because they define information about how to deliver the push notification. The following list shows the properties that CloudKit removes, and the order for removing them: 1. “CKNotification/containerIdentifier“ 2. Keys that subclasses of `CKNotification` define. 3. “CKNotification/soundName“ 4. “CKNotification/alertLaunchImage“ 5. “CKNotification/alertActionLocalizationKey“ 6. “CKNotification/alertBody“ 7. “CKNotification/alertLocalizationArgs“ 8. “CKNotification/alertLocalizationKey“ 9. “CKNotification/badge“ 10. “CKNotification/notificationID“

func (*CKNotification) NotificationID

func (o *CKNotification) NotificationID() *CKNotificationID

The notification's ID. Use this property to differentiate notifications.

func (*CKNotification) NotificationType

func (o *CKNotification) NotificationType() CKNotificationType

The type of event that generates the notification. Different notification types correspond to different subclasses of “CKNotification“, so you can use the value in this property to determine how to handle the notification data.

func (*CKNotification) SoundName

func (o *CKNotification) SoundName() unsafe.Pointer

The name of the sound file to play when a notification arrives. The system uses this property's value to locate a sound file in the app's bundle. The sound plays when the system receives a push notification. If the system can't find the specified file, or if the property's value is the string `default`, the system plays the default sound.

func (*CKNotification) SubscriptionID

func (o *CKNotification) SubscriptionID() *foundation.NSString

The ID of the subscription that triggers the notification.

func (*CKNotification) SubscriptionOwnerUserRecordID

func (o *CKNotification) SubscriptionOwnerUserRecordID() *CKRecordID

The ID of the user record that creates the subscription that generates the push notification. On a system that supports multiple users, such as tvOS, use this identifier to check whether the pending content is for the current user. If your app always fetches data from CloudKit on launch, you may improve efficiency by disregarding notifications for other users. For more information about supporting a multiuser environment, see <doc://com.apple.documentation/documentation/tvservices/personalizing-your-app-for-each-user-on-apple-tv>.

func (*CKNotification) Subtitle

func (o *CKNotification) Subtitle() unsafe.Pointer

The notification's subtitle. The system ignores this property if “CKNotification/subtitleLocalizationKey“ has a value.

func (*CKNotification) SubtitleLocalizationArgs

func (o *CKNotification) SubtitleLocalizationArgs() unsafe.Pointer

The fields for building a notification's subtitle. This property is an array of field names that CloudKit uses to extract the corresponding values from the record that triggers the push notification. The values are strings, numbers, or dates. CloudKit may truncate strings with a length greater than 100 characters when it adds them to a notification's payload. If you use `%@` for your substitution variables, CloudKit replaces those variables by traversing the array in order. If you use variables of the form `%n$@`, where `n` is an integer, `n` represents the index (starting at 1) of the item in the array to use. So, the first item in the array replaces the variable `%1$@`, the second item replaces the variable `%2$@`, and so on. You can use indexed substitution variables to change the order of items in the resulting string, which might be necessary when you localize your app's content.

func (*CKNotification) SubtitleLocalizationKey

func (o *CKNotification) SubtitleLocalizationKey() unsafe.Pointer

The key that identifies the localized string for the notification's subtitle. This property takes precedence over “CKNotification/subtitle“.

func (*CKNotification) Title

func (o *CKNotification) Title() unsafe.Pointer

The notification's title. The system ignores this property if “CKNotification/titleLocalizationKey“ has a value.

func (*CKNotification) TitleLocalizationArgs

func (o *CKNotification) TitleLocalizationArgs() unsafe.Pointer

The fields for building a notification's title. This property is an array of field names that CloudKit uses to extract the corresponding values from the record that triggers the push notification. The values are strings, numbers, or dates. CloudKit may truncate strings with a length greater than 100 characters when it adds them to a notification's payload. If you use `%@` for your substitution variables, CloudKit replaces those variables by traversing the array in order. If you use variables of the form `%n$@`, where `n` is an integer, `n` represents the index (starting at 1) of the item in the array to use. So, the first item in the array replaces the variable `%1$@`, the second item replaces the variable `%2$@`, and so on. You can use indexed substitution variables to change the order of items in the resulting string, which might be necessary when you localize your app's content.

func (*CKNotification) TitleLocalizationKey

func (o *CKNotification) TitleLocalizationKey() unsafe.Pointer

The key that identifies the localized string for the notification's title. This property takes precedence over “CKNotification/title“.

type CKNotificationID

type CKNotificationID struct {
	foundation.NSObject
}

An object that uniquely identifies a push notification that a container sends.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cknotificationid

func CKNotificationIDFromID

func CKNotificationIDFromID(id objc.ID) *CKNotificationID

type CKNotificationInfo

type CKNotificationInfo struct {
	foundation.NSObject
}

An object that describes the configuration of a subscription’s push notifications.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cknotificationinfo

func CKNotificationInfoFromID

func CKNotificationInfoFromID(id objc.ID) *CKNotificationInfo

func (*CKNotificationInfo) AlertActionLocalizationKey

func (o *CKNotificationInfo) AlertActionLocalizationKey() unsafe.Pointer

The key that identifies the localized string for the notification's action. Set this property's value to have the system use a localized string for the text of the notification's button that opens your app. The system uses the key to find the matching string in your app's `Localizable.string` file. If this property's value is `nil`, the system displays a single button to dismiss the alert. For information about localizing string resources, see [Internationalization and Localization Guide](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/Introduction/Introduction.html#//apple_ref/doc/uid/10000171i).

func (*CKNotificationInfo) AlertBody

func (o *CKNotificationInfo) AlertBody() unsafe.Pointer

The text for the notification's alert. Set this property's value to have the system display the specified string when it receives the corresponding push notification. If you localize your app's content, use the “CKSubscription/NotificationInfo/alertLocalizationKey“ property instead.

func (*CKNotificationInfo) AlertLaunchImage

func (o *CKNotificationInfo) AlertLaunchImage() unsafe.Pointer

The filename of an image to use as a launch image. If you specify a value, the system uses it to locate an image in the app's bundle, and displays it as a launch image when the user launches the app after receiving a push notification.

func (*CKNotificationInfo) AlertLocalizationArgs

func (o *CKNotificationInfo) AlertLocalizationArgs() unsafe.Pointer

The fields for building a notification's alert. This property is an array of field names that CloudKit uses to extract the corresponding values from the record that triggers the push notification. The values must be strings, numbers, or dates. Don't specify keys that use other value types. CloudKit may truncate strings with a length greater than 100 characters when it adds them to a notification's payload. If you use `%@` for your substitution variables, CloudKit replaces those variables by traversing the array in order. If you use variables of the form `%n$@`, where `n` is an integer, `n` represents the index (starting at 1) of the item in the array to use. So, the first item in the array replaces the variable `%1$@`, the second item replaces the variable `%2$@`, and so on. You can use indexed substitution variables to change the order of items in the resulting string, which might be necessary when you localize your app's content.

func (*CKNotificationInfo) AlertLocalizationKey

func (o *CKNotificationInfo) AlertLocalizationKey() unsafe.Pointer

The key that identifies the localized string for the notification's alert. Set this property's value to have the system display a localized string when it receives the corresponding push notification. The system uses the key to find the matching string in your app's `Localizable.string` file. If you specify a value for this property, CloudKit ignores the “CKSubscription/NotificationInfo/alertBody“ property's value. For information about localizing string resources, see [Internationalization and Localization Guide](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/Introduction/Introduction.html#//apple_ref/doc/uid/10000171i).

func (*CKNotificationInfo) Category

func (o *CKNotificationInfo) Category() unsafe.Pointer

The name of the action group that corresponds to this notification. Categories allow you to present custom actions to the user on your push notifications. For more information, see <doc://com.apple.documentation/documentation/uikit/uimutableusernotificationcategory>.

func (*CKNotificationInfo) CollapseIDKey

func (o *CKNotificationInfo) CollapseIDKey() *foundation.NSString

A value that the system uses to coalesce unseen push notifications. When CloudKit generates a push notification, it sets the notification's `apns-collapse-id` header to this property's value. The system uses this header to coalesce unseen notifications. See <doc://com.apple.documentation/documentation/usernotifications/sending-notification-requests-to-apns> for more information about sending notifications using the Apple Push Notification service.

func (*CKNotificationInfo) DesiredKeys

The names of fields to include in the push notification's payload. This property contains an array of strings, each of which corresponds to the name of a field in the record that triggers the notification. When the system receives a notification, it includes the keys, and their corresponding values. You can request a maximum of three keys. For the keys you specify, the allowable types are <doc://com.apple.documentation/documentation/foundation/nsstring>, <doc://com.apple.documentation/documentation/foundation/nsnumber>, <doc://com.apple.documentation/documentation/corelocation/cllocation>, <doc://com.apple.documentation/documentation/foundation/nsdate>, and “CKRecord/Reference“. You can't specify keys with values that contain other data types. CloudKit may truncate strings that are more than 100 characters when it adds them to the notification's payload.

func (*CKNotificationInfo) SetAlertActionLocalizationKey

func (o *CKNotificationInfo) SetAlertActionLocalizationKey(alertActionLocalizationKey unsafe.Pointer)

func (*CKNotificationInfo) SetAlertBody

func (o *CKNotificationInfo) SetAlertBody(alertBody unsafe.Pointer)

func (*CKNotificationInfo) SetAlertLaunchImage

func (o *CKNotificationInfo) SetAlertLaunchImage(alertLaunchImage unsafe.Pointer)

func (*CKNotificationInfo) SetAlertLocalizationArgs

func (o *CKNotificationInfo) SetAlertLocalizationArgs(alertLocalizationArgs unsafe.Pointer)

func (*CKNotificationInfo) SetAlertLocalizationKey

func (o *CKNotificationInfo) SetAlertLocalizationKey(alertLocalizationKey unsafe.Pointer)

func (*CKNotificationInfo) SetCategory

func (o *CKNotificationInfo) SetCategory(category unsafe.Pointer)

func (*CKNotificationInfo) SetCollapseIDKey

func (o *CKNotificationInfo) SetCollapseIDKey(collapseIDKey *foundation.NSString)

func (*CKNotificationInfo) SetDesiredKeys

func (o *CKNotificationInfo) SetDesiredKeys(desiredKeys *foundation.NSArray[*foundation.NSString])

func (*CKNotificationInfo) SetShouldBadge

func (o *CKNotificationInfo) SetShouldBadge(shouldBadge bool)

func (*CKNotificationInfo) SetShouldSendContentAvailable

func (o *CKNotificationInfo) SetShouldSendContentAvailable(shouldSendContentAvailable bool)

func (*CKNotificationInfo) SetShouldSendMutableContent

func (o *CKNotificationInfo) SetShouldSendMutableContent(shouldSendMutableContent bool)

func (*CKNotificationInfo) SetSoundName

func (o *CKNotificationInfo) SetSoundName(soundName unsafe.Pointer)

func (*CKNotificationInfo) SetSubtitle

func (o *CKNotificationInfo) SetSubtitle(subtitle unsafe.Pointer)

func (*CKNotificationInfo) SetSubtitleLocalizationArgs

func (o *CKNotificationInfo) SetSubtitleLocalizationArgs(subtitleLocalizationArgs unsafe.Pointer)

func (*CKNotificationInfo) SetSubtitleLocalizationKey

func (o *CKNotificationInfo) SetSubtitleLocalizationKey(subtitleLocalizationKey unsafe.Pointer)

func (*CKNotificationInfo) SetTitle

func (o *CKNotificationInfo) SetTitle(title unsafe.Pointer)

func (*CKNotificationInfo) SetTitleLocalizationArgs

func (o *CKNotificationInfo) SetTitleLocalizationArgs(titleLocalizationArgs unsafe.Pointer)

func (*CKNotificationInfo) SetTitleLocalizationKey

func (o *CKNotificationInfo) SetTitleLocalizationKey(titleLocalizationKey unsafe.Pointer)

func (*CKNotificationInfo) ShouldBadge

func (o *CKNotificationInfo) ShouldBadge() bool

A Boolean value that determines whether an app's icon badge increments its value. The default value of this property is <doc://com.apple.documentation/documentation/swift/false>. Set it to <doc://com.apple.documentation/documentation/swift/true> to cause the system to increment the badge value whenever it receives the corresponding push notification.

func (*CKNotificationInfo) ShouldSendContentAvailable

func (o *CKNotificationInfo) ShouldSendContentAvailable() bool

A Boolean value that indicates whether the push notification includes the content available flag. When this property is <doc://com.apple.documentation/documentation/swift/true>, the server includes the `content-available` flag in the push notification's payload. That flag causes the system to wake or launch an app that isn't currently running. The app then receives background execution time to download any data for the push notification, such as the set of changed records. If the app is already running in the foreground, the inclusion of this flag has no additional effect and the system delivers the notification to the app delegate for processing as usual. The default value of this property is <doc://com.apple.documentation/documentation/swift/false>.

func (*CKNotificationInfo) ShouldSendMutableContent

func (o *CKNotificationInfo) ShouldSendMutableContent() bool

A Boolean value that indicates whether the push notification sets the mutable content flag. When this property is <doc://com.apple.documentation/documentation/swift/true>, the server includes the `mutable-content` flag with a value of `1` in the push notification's payload. When the value is `1`, the system passes the notification to your app extension for modification before delivery. See <doc://com.apple.documentation/documentation/usernotifications/generating-a-remote-notification> for more information about the `mutable-content` flag, and <doc://com.apple.documentation/documentation/usernotifications/modifying-content-in-newly-delivered-notifications> for information about how to modify push notifiction content in your app extension prior to delivery. The default value of this property is <doc://com.apple.documentation/documentation/swift/false>.

func (*CKNotificationInfo) SoundName

func (o *CKNotificationInfo) SoundName() unsafe.Pointer

The filename of the sound file to play when a notification arrives. If you specify a value, the system uses it to locate a sound file in the app's bundle. The sound plays when the system receives a push notification. If the system can't find the specified file, or if you use the string `default`, the system plays the default sound.

func (*CKNotificationInfo) Subtitle

func (o *CKNotificationInfo) Subtitle() unsafe.Pointer

The notification's subtitle. CloudKit uses this value to set the `subtitle` push notification property. If you set “CKSubscription/NotificationInfo/subtitleLocalizationKey“, CloudKit ignores this value. See <doc://com.apple.documentation/documentation/usernotifications/generating-a-remote-notification> for more details about push notification properties.

func (*CKNotificationInfo) SubtitleLocalizationArgs

func (o *CKNotificationInfo) SubtitleLocalizationArgs() unsafe.Pointer

The fields for building a notification's subtitle. This property is an array of field names that CloudKit uses to extract the corresponding values from the record that triggers the push notification. The values must be strings, numbers, or dates. Don't specify keys that use other value types. CloudKit may truncate strings with a length greater than 100 characters when it adds them to a notification's payload. If you use `%@` for your substitution variables, CloudKit replaces those variables by traversing the array in order. If you use variables of the form `%n$@`, where `n` is an integer, `n` represents the index (starting at 1) of the item in the array to use. So, the first item in the array replaces the variable `%1$@`, the second item replaces the variable `%2$@`, and so on. You can use indexed substitution variables to change the order of items in the resulting string, which might be necessary when you localize your app's content.

func (*CKNotificationInfo) SubtitleLocalizationKey

func (o *CKNotificationInfo) SubtitleLocalizationKey() unsafe.Pointer

The key that identifies the localized string for the notification's subtitle. CloudKit uses this value to set the `subtitle-loc-key` push notification property. Setting this property overrides any value in “CKSubscription/NotificationInfo/subtitle“. See <doc://com.apple.documentation/documentation/usernotifications/generating-a-remote-notification> for more details about push notification properties.

func (*CKNotificationInfo) Title

func (o *CKNotificationInfo) Title() unsafe.Pointer

The notification's title. CloudKit uses this value to set the `title` push notification property. See <doc://com.apple.documentation/documentation/usernotifications/generating-a-remote-notification> for more detail about push notification properties.

func (*CKNotificationInfo) TitleLocalizationArgs

func (o *CKNotificationInfo) TitleLocalizationArgs() unsafe.Pointer

The fields for building a notification's title. This property is an array of field names that CloudKit uses to extract the corresponding values from the record that triggers the push notification. The values must be strings, numbers, or dates. Don't specify keys that use other value types. CloudKit may truncate strings with a length greater than 100 characters when it adds them to a notification's payload. If you use `%@` for your substitution variables, CloudKit replaces those variables by traversing the array in order. If you use variables of the form `%n$@`, where `n` is an integer, `n` represents the index (starting at 1) of the item in the array to use. So, the first item in the array replaces the variable `%1$@`, the second item replaces the variable `%2$@`, and so on. You can use indexed substitution variables to change the order of items in the resulting string, which might be necessary when you localize your app's content.

func (*CKNotificationInfo) TitleLocalizationKey

func (o *CKNotificationInfo) TitleLocalizationKey() unsafe.Pointer

The key that identifies the localized string for the notification's title. CloudKit uses this value to set the `title-loc-key` push notification property. See <doc://com.apple.documentation/documentation/usernotifications/generating-a-remote-notification> for more details about push notification properties.

type CKNotificationType

type CKNotificationType int64

Constants that indicate the type of event that generates the push notification.

const (
	// A notification that CloudKit generates from a query subscription's predicate.
	CKNotificationTypeQuery CKNotificationType = 1
	// A notification that CloudKit generates when the contents of a record zone change.
	CKNotificationTypeRecordZone CKNotificationType = 2
	// A notification that your app marks as read.
	CKNotificationTypeReadNotification CKNotificationType = 3
	// A notification that CloudKit generates when the contents of a database change.
	CKNotificationTypeDatabase CKNotificationType = 4
)

func (CKNotificationType) String

func (e CKNotificationType) String() string

type CKOperation

type CKOperation struct {
	foundation.NSOperation
}

The abstract base class for all operations that execute in a database.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckoperation

func CKOperationFromID

func CKOperationFromID(id objc.ID) *CKOperation

func (*CKOperation) AllowsCellularAccess

func (o *CKOperation) AllowsCellularAccess() bool

A Boolean value that indicates whether the operation can send data over the cellular network. @DeprecationSummary { Use “CKOperation/Configuration/allowsCellularAccess“ instead. } When you send or receive many records, or when you send records with large assets, you might set this property to <doc://com.apple.documentation/documentation/swift/false> to avoid consuming too much of the user's cellular data bandwidth. The default value is <doc://com.apple.documentation/documentation/swift/true>. When this property is <doc://com.apple.documentation/documentation/swift/false>, the operation fails if Wi-Fi isn't available. Deprecated: Use CKOperationConfiguration

func (*CKOperation) Configuration

func (o *CKOperation) Configuration() *CKOperationConfiguration

The operation's configuration.

func (*CKOperation) Container

func (o *CKOperation) Container() *CKContainer

The operation's container. @DeprecationSummary { Use “CKOperation/Configuration/container“ instead. } The container defines where the operation executes. The “CKContainer/add(_:)“ method of the “CKContainer“ and “CKDatabase“ classes implicitly set this property to their container. If you execute the operation yourself, either directly or using a custom operation queue, set the value of this property explicitly. If the value is `nil` when you execute an operation, the operation implicitly executes in your app's default container. Deprecated: Use CKOperationConfiguration

func (*CKOperation) Group

func (o *CKOperation) Group() *CKOperationGroup

The operation's group.

func (*CKOperation) Init

func (o *CKOperation) Init() *CKOperation

Creates an operation.

func (*CKOperation) IsLongLived

func (o *CKOperation) IsLongLived() bool

A Boolean value that indicates whether the operation is long-lived. @DeprecationSummary { Use “CKOperation/Configuration/isLongLived“ instead. } Set this property to <doc://com.apple.documentation/documentation/swift/true> to make the operation long-lived. The default value is <doc://com.apple.documentation/documentation/swift/false>. If you change this property's value after you execute the operation, the change has no effect. For more information, see <doc:CKOperation#Long-Lived-Operations>. Deprecated: Use CKOperationConfiguration

func (*CKOperation) LongLivedOperationWasPersistedBlock

func (o *CKOperation) LongLivedOperationWasPersistedBlock() objc.Block

The closure to execute when the server begins to store callbacks for the long-lived operation. If your app exits before CloudKit calls this property's value, the system doesn't include the operation's ID in the results of calls to the “CKContainer/allLongLivedOperationIDs()“ method. For more information, see <doc:CKOperation#Long-Lived-Operations>.

func (*CKOperation) OperationID

func (o *CKOperation) OperationID() *foundation.NSString

A unique identifier for a long-lived operation. Pass this property's value to the “CKContainer/longLivedOperation(for:)“ method to fetch the corresponding long-lived operation. For more information, see <doc:CKOperation#Long-Lived-Operations>.

func (*CKOperation) SetAllowsCellularAccess deprecated

func (o *CKOperation) SetAllowsCellularAccess(allowsCellularAccess bool)

Deprecated: Use CKOperationConfiguration

func (*CKOperation) SetConfiguration

func (o *CKOperation) SetConfiguration(configuration *CKOperationConfiguration)

func (*CKOperation) SetContainer deprecated

func (o *CKOperation) SetContainer(container *CKContainer)

Deprecated: Use CKOperationConfiguration

func (*CKOperation) SetGroup

func (o *CKOperation) SetGroup(group *CKOperationGroup)

func (*CKOperation) SetLongLived deprecated

func (o *CKOperation) SetLongLived(longLived bool)

Deprecated: Use CKOperationConfiguration

func (*CKOperation) SetLongLivedOperationWasPersistedBlock

func (o *CKOperation) SetLongLivedOperationWasPersistedBlock(longLivedOperationWasPersistedBlock func())

func (*CKOperation) SetTimeoutIntervalForRequest deprecated

func (o *CKOperation) SetTimeoutIntervalForRequest(timeoutIntervalForRequest float64)

Deprecated: Use CKOperationConfiguration

func (*CKOperation) SetTimeoutIntervalForResource deprecated

func (o *CKOperation) SetTimeoutIntervalForResource(timeoutIntervalForResource float64)

Deprecated: Use CKOperationConfiguration

func (*CKOperation) TimeoutIntervalForRequest

func (o *CKOperation) TimeoutIntervalForRequest() float64

The timeout interval when waiting for additional data. @DeprecationSummary { Use “CKOperation/Configuration/timeoutIntervalForRequest“ instead. } This property determines the request timeout interval for the operation, which controls how long, in seconds, the operation waits for additional data to arrive before stopping. The timer for this value resets whenever new data arrives. When the timer reaches the interval without receiving any new data, it triggers a timeout. The default value is `60`. Deprecated: Use CKOperationConfiguration

func (*CKOperation) TimeoutIntervalForResource

func (o *CKOperation) TimeoutIntervalForResource() float64

The maximum amount of time that a resource request can use. @DeprecationSummary { Use “CKOperation/Configuration/timeoutIntervalForResource“ instead. } This property determines the resource timeout interval for this operation, which controls how long, in seconds, to wait for the entire operation to complete before stopping. The resource timer starts when the operation executes and counts until either the operation completes or this timeout interval occurs, whichever comes first. The default value is `604800`, the number of seconds in 7 days. Deprecated: Use CKOperationConfiguration

type CKOperationConfiguration

type CKOperationConfiguration struct {
	foundation.NSObject
}

An object that describes how a CloudKit operation behaves.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckoperationconfiguration

func CKOperationConfigurationFromID

func CKOperationConfigurationFromID(id objc.ID) *CKOperationConfiguration

func (*CKOperationConfiguration) AllowsCellularAccess

func (o *CKOperationConfiguration) AllowsCellularAccess() bool

A Boolean value that indicates whether operations that use this configuration can send data over the cellular network.

func (*CKOperationConfiguration) Container

func (o *CKOperationConfiguration) Container() *CKContainer

The configuration's container. If you don't provide a container, CloudKit uses the default container that “CKContainer“ provides.

func (*CKOperationConfiguration) IsLongLived

func (o *CKOperationConfiguration) IsLongLived() bool

A Boolean value that indicates whether the operations that use this configuration are long-lived.

func (*CKOperationConfiguration) QualityOfService

The priority that the system uses when it allocates resources to the operations that use this configuration.

func (*CKOperationConfiguration) SetAllowsCellularAccess

func (o *CKOperationConfiguration) SetAllowsCellularAccess(allowsCellularAccess bool)

func (*CKOperationConfiguration) SetContainer

func (o *CKOperationConfiguration) SetContainer(container *CKContainer)

func (*CKOperationConfiguration) SetLongLived

func (o *CKOperationConfiguration) SetLongLived(longLived bool)

func (*CKOperationConfiguration) SetQualityOfService

func (o *CKOperationConfiguration) SetQualityOfService(qualityOfService foundation.NSQualityOfService)

func (*CKOperationConfiguration) SetTimeoutIntervalForRequest

func (o *CKOperationConfiguration) SetTimeoutIntervalForRequest(timeoutIntervalForRequest float64)

func (*CKOperationConfiguration) SetTimeoutIntervalForResource

func (o *CKOperationConfiguration) SetTimeoutIntervalForResource(timeoutIntervalForResource float64)

func (*CKOperationConfiguration) TimeoutIntervalForRequest

func (o *CKOperationConfiguration) TimeoutIntervalForRequest() float64

The maximum amount of time that a request can take. - SeeAlso: `NSURLSessionConfiguration.timeoutIntervalForRequest`

func (*CKOperationConfiguration) TimeoutIntervalForResource

func (o *CKOperationConfiguration) TimeoutIntervalForResource() float64

The maximum amount of time that a resource request can take. - SeeAlso: `NSURLSessionConfiguration.timeoutIntervalForResource`

type CKOperationGroup

type CKOperationGroup struct {
	foundation.NSObject
}

An explicit association between two or more operations.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckoperationgroup

func CKOperationGroupFromID

func CKOperationGroupFromID(id objc.ID) *CKOperationGroup

func (*CKOperationGroup) DefaultConfiguration

func (o *CKOperationGroup) DefaultConfiguration() *CKOperationConfiguration

The default configuration for operations in the group. If an operation in the group has its own configuration, that configuration's values override the default configuration's values. For more information, see “CKOperation/Configuration“.

func (*CKOperationGroup) ExpectedReceiveSize

func (o *CKOperationGroup) ExpectedReceiveSize() CKOperationGroupTransferSize

The estimated size of traffic to download from CloudKit. This property informs the system about the amount of data your app can transfer. An order-of-magnitude estimate is better than no estimate, and accuracy helps performance. The system checks this value when it schedules discretionary network requests.

func (*CKOperationGroup) ExpectedSendSize

func (o *CKOperationGroup) ExpectedSendSize() CKOperationGroupTransferSize

The estimated size of traffic to upload to CloudKit. This property informs the system about the amount of data your app can transfer. An order-of-magnitude estimate is better than no estimate, and accuracy helps performance. The system checks this value when it schedules discretionary network requests.

func (*CKOperationGroup) Init

Creates an operation group.

func (*CKOperationGroup) InitWithCoder

func (o *CKOperationGroup) InitWithCoder(aDecoder *foundation.NSCoder) *CKOperationGroup

Creates an operation group from a serialized instance.

func (*CKOperationGroup) Name

The operation group's name. The system sends the name of the operation group to CloudKit to provide aggregate reporting for “CKOperationGroup“. The name must not include any personal data.

func (*CKOperationGroup) OperationGroupID

func (o *CKOperationGroup) OperationGroupID() *foundation.NSString

The operation group's unique identifier. The framework generates this value and it's unique to this operation group. The system sends this identifier to CloudKit, which can use it to identify server-side logs for “CKOperationGroup“.

func (*CKOperationGroup) Quantity

func (o *CKOperationGroup) Quantity() uint

The number of operations in the operation group. This property shows the number of operations that you expect to be in this operation group. It's the developer's responsibility to set this value.

func (*CKOperationGroup) SetDefaultConfiguration

func (o *CKOperationGroup) SetDefaultConfiguration(defaultConfiguration *CKOperationConfiguration)

func (*CKOperationGroup) SetExpectedReceiveSize

func (o *CKOperationGroup) SetExpectedReceiveSize(expectedReceiveSize CKOperationGroupTransferSize)

func (*CKOperationGroup) SetExpectedSendSize

func (o *CKOperationGroup) SetExpectedSendSize(expectedSendSize CKOperationGroupTransferSize)

func (*CKOperationGroup) SetName

func (o *CKOperationGroup) SetName(name *foundation.NSString)

func (*CKOperationGroup) SetQuantity

func (o *CKOperationGroup) SetQuantity(quantity uint)

type CKOperationGroupTransferSize

type CKOperationGroupTransferSize int64

Constants that represent possible data transfer sizes.

const (
	// An unknown transfer size.
	CKOperationGroupTransferSizeUnknown CKOperationGroupTransferSize = 0
	// A transfer size that represents 1 or more kilobytes.
	CKOperationGroupTransferSizeKilobytes CKOperationGroupTransferSize = 1
	// A transfer size that represents 1 or more megabytes.
	CKOperationGroupTransferSizeMegabytes CKOperationGroupTransferSize = 2
	// A transfer size that represents tens of megabytes.
	CKOperationGroupTransferSizeTensOfMegabytes CKOperationGroupTransferSize = 3
	// A transfer size that represents hundreds of megabytes.
	CKOperationGroupTransferSizeHundredsOfMegabytes CKOperationGroupTransferSize = 4
	// A transfer size that represents 1 or more gigabytes.
	CKOperationGroupTransferSizeGigabytes CKOperationGroupTransferSize = 5
	// A transfer size that represents tens of gigabytes.
	CKOperationGroupTransferSizeTensOfGigabytes CKOperationGroupTransferSize = 6
	// A transfer size that represents hundreds of gigabytes.
	CKOperationGroupTransferSizeHundredsOfGigabytes CKOperationGroupTransferSize = 7
)

func (CKOperationGroupTransferSize) String

type CKQuery

type CKQuery struct {
	foundation.NSObject
}

A query that describes the criteria to apply when searching for records in a database.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckquery

func CKQueryFromID

func CKQueryFromID(id objc.ID) *CKQuery

func (*CKQuery) InitWithCoder

func (o *CKQuery) InitWithCoder(aDecoder *foundation.NSCoder) *CKQuery

Creates an operation group from a serialized instance.

func (*CKQuery) InitWithRecordTypePredicate

func (o *CKQuery) InitWithRecordTypePredicate(recordType *foundation.NSString, predicate *foundation.NSPredicate) *CKQuery

Creates a query with the specified record type and predicate.

func (*CKQuery) Predicate

func (o *CKQuery) Predicate() *foundation.NSPredicate

The predicate to use for matching records. A predicate contains one or more expressions that evaluate to <doc://com.apple.documentation/documentation/swift/true> or <doc://com.apple.documentation/documentation/swift/false>. Expressions are often value-based comparisons, but predicates support other types of operators, including string comparisons and aggregate operations. For guidelines on how to construct predicates for your queries, see <doc:CKQuery#Predicate-Rules-for-Query-Objects>.

func (*CKQuery) RecordType

func (o *CKQuery) RecordType() *foundation.NSString

The record type to search. A query's results include only records of the specified type. The record type is an app-specific string that you use to distinguish among the records of your app. The records of a particular type all represent different instances of the same information. For example, an employee record type might store the employee's name, phone number, and a reference to the employee's manager.

func (*CKQuery) SetSortDescriptors

func (o *CKQuery) SetSortDescriptors(sortDescriptors *foundation.NSArray[*foundation.NSSortDescriptor])

func (*CKQuery) SortDescriptors

func (o *CKQuery) SortDescriptors() *foundation.NSArray[*foundation.NSSortDescriptor]

The sort descriptors for organizing the query's results. You can add sort descriptors to a query and change them later as necessary. Each sort descriptor contains a field name of the intended record type and information about whether to sort values in that field in ascending or descending order. The default value of this property is `nil`, which means that records return in an indeterminate order. The order of the items in the array defines the order that CloudKit applies the sort descriptors to the results. In other words, CloudKit applies the first sort descriptor in the array, then the second sort descriptor, if necessary, then the third, and so on.

type CKQueryCursor

type CKQueryCursor struct {
	foundation.NSObject
}

An object that marks the stopping point for a query and the starting point for retrieving the remaining results.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckquerycursor

func CKQueryCursorFromID

func CKQueryCursorFromID(id objc.ID) *CKQueryCursor

type CKQueryNotification

type CKQueryNotification struct {
	CKNotification
}

A notification that triggers when a record that matches the subscription’s predicate changes.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckquerynotification

func CKQueryNotificationFromID

func CKQueryNotificationFromID(id objc.ID) *CKQueryNotification

func (*CKQueryNotification) DatabaseScope

func (o *CKQueryNotification) DatabaseScope() CKDatabaseScope

The type of database for the record zone. This property's value is one of the constants that “CKDatabase/Scope“ defines.

func (*CKQueryNotification) QueryNotificationReason

func (o *CKQueryNotification) QueryNotificationReason() CKQueryNotificationReason

The event that triggers the push notification. Subscription notifications result from the creation, deletion, or updating of a single record. The record in question must match the subscription's predicate for an event to trigger.

func (*CKQueryNotification) RecordFields

A dictionary of fields that have changes. For record updates and creations, this property contains the subscription's desired keys. When you configure the notification info of a subscription, you specify the names of one or more fields in the “CKSubscription/NotificationInfo/desiredKeys“ property. When a push notification triggers, CloudKit retrieves the values for each of those keys from the record and includes them in the notification's payload. For query notifications that you fetch from a container, all keys and values are present. For query notifications that you create from push notifications, one or more keys and values may be missing. Push notification payloads have a size limit, and CloudKit can exclude record fields when a payload exceeds that limit. For information about the order, see the overview of this class.

func (*CKQueryNotification) RecordID

func (o *CKQueryNotification) RecordID() *CKRecordID

The ID of the record that CloudKit creates, updates, or deletes. Use this value to fetch the record.

type CKQueryNotificationReason

type CKQueryNotificationReason int64

Constants that indicate the event that triggers the notification.

const (
	// A notification that indicates the creation of a record matching the subscription's predicate.
	CKQueryNotificationReasonRecordCreated CKQueryNotificationReason = 1
	// A notification that indicates the update of a record matching the subscription's predicate.
	CKQueryNotificationReasonRecordUpdated CKQueryNotificationReason = 2
	// A notification that indicates the deletion of a record matching the subscription's predicate.
	CKQueryNotificationReasonRecordDeleted CKQueryNotificationReason = 3
)

func (CKQueryNotificationReason) String

func (e CKQueryNotificationReason) String() string

type CKQueryOperation

type CKQueryOperation struct {
	CKDatabaseOperation
}

An operation for executing queries in a database.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckqueryoperation

func CKQueryOperationFromID

func CKQueryOperationFromID(id objc.ID) *CKQueryOperation

func (*CKQueryOperation) Cursor

func (o *CKQueryOperation) Cursor() *CKQueryCursor

The cursor for continuing the search. The initial value of this property is the cursor that you provide to the “CKQueryOperation/init(cursor:)“ method. When you use a cursor, the operation ignores the contents of the “CKQueryOperation/query“ property. This property's value is an opaque value that CloudKit provides. For more information, see the “CKQueryOperation/queryCompletionBlock“ property. If you intend to specify or change the value in this property, do so before you execute the operation or submit it to a queue.

func (*CKQueryOperation) DesiredKeys

The fields of the records to fetch. Use this property to limit the amount of data that CloudKit returns for each record. When CloudKit returns a record, it only includes fields with names that match one of the keys in this property. The property's default value is `nil`, which instructs CloudKit to return all of a record's keys. If you intend to specify a value other than `nil`, do so before you execute the operation or add the operation to a queue.

func (*CKQueryOperation) Init

Creates an empty query operation.

func (*CKQueryOperation) InitWithCursor

func (o *CKQueryOperation) InitWithCursor(cursor *CKQueryCursor) *CKQueryOperation

Creates an operation with additional results from a previous search.

func (*CKQueryOperation) InitWithQuery

func (o *CKQueryOperation) InitWithQuery(query *CKQuery) *CKQueryOperation

Creates an operation that searches for records in the specified record zone.

func (*CKQueryOperation) Query

func (o *CKQueryOperation) Query() *CKQuery

The query for the search. The initial value of this property is the query that you provide to the “CKQueryOperation/init(query:)“ method. When the value in the “CKQueryOperation/cursor“ property is `nil`, the operation uses this property's value to execute a new search and return its results to your completion handler. If “CKQueryOperation/cursor“ isn't `nil`, the operation uses the cursor instead. If you intend to specify or change the value of this property, do so before you execute the operation or submit it to a queue.

func (*CKQueryOperation) QueryCompletionBlock

func (o *CKQueryOperation) QueryCompletionBlock() objc.Block

The closure to execute after CloudKit retrieves all of the records. The closure returns no value and takes the following parameters: - A cursor that indicates there are more results to fetch, or `nil` if there are no additional results. Use the cursor to create a new query operation when you're ready to retrieve the next batch of results. - An error that contains information about a problem, or `nil` if CloudKit retrieves the results successfully. This closure executes only once, and represents your final opportunity to process the results. It executes after all of the individual record fetch closures. The closure executes serially with respect to the other closures of the operation. If the number of records that the operation intends to return exceeds “CKQueryOperation/resultsLimit“, the operation provides a cursor that you can use to retrieve the next batch of results. You must create a separate operation using the cursor to fetch the next batch of results. Update the value of this property before you execute the operation or submit it to a queue.

func (*CKQueryOperation) RecordFetchedBlock

func (o *CKQueryOperation) RecordFetchedBlock() objc.Block

The closure to execute when a record becomes available. The closure returns no value and takes the following parameter: - A single record that matches the search criteria. After identifying and sorting the records, the query operation executes this closure once for each of the result's records. The closure executes serially with respect to all other closures of the operation, so you can expect only one closure at a time to execute for this operation. Set the property's value before you execute the operation or submit it to a queue. - Warning: Query indexes update asynchronously so they aren't always current. If you query for records that you recently changed and don't allow enough time for those changes to process, the query's results may be incorrect. The results may not contain the correct records, and the records may be out of order. Deprecated: Use recordMatchedBlock instead, which surfaces per-record errors

func (*CKQueryOperation) RecordMatchedBlock

func (o *CKQueryOperation) RecordMatchedBlock() objc.Block

The closure to execute when a record match is available. The closure returns no value and takes the following parameters: - The ID of the record. - The record, or `nil` if CloudKit can't retrieve the record. - If CloudKit can't retrieve the record, an error that provides information about the failure; otherwise, `nil`. After identifying and sorting the records, the query operation executes this closure once for each of the result's records. The closure executes serially with respect to all other closures of the operation, so you can expect only one closure at a time to execute for this operation. Set the property's value before you execute the operation or submit it to a queue. - Warning: Query indexes update asynchronously so they aren't always current. If you query for records that you recently changed and don't allow enough time for those changes to process, the query's results may be incorrect. The results may not contain the correct records, and the records may be out of order.

func (*CKQueryOperation) ResultsLimit

func (o *CKQueryOperation) ResultsLimit() uint

The maximum number of records to return at one time. For most queries, leave the value of this property as the default value, which is the “CKQueryOperation/maximumResults“ constant. When using that value, CloudKit returns as many records as possible while minimizing delays in receiving those records. If you want to process a fixed number of results, change the value of this property accordingly.

func (*CKQueryOperation) SetCursor

func (o *CKQueryOperation) SetCursor(cursor *CKQueryCursor)

func (*CKQueryOperation) SetDesiredKeys

func (o *CKQueryOperation) SetDesiredKeys(desiredKeys *foundation.NSArray[*foundation.NSString])

func (*CKQueryOperation) SetQuery

func (o *CKQueryOperation) SetQuery(query *CKQuery)

func (*CKQueryOperation) SetQueryCompletionBlock

func (o *CKQueryOperation) SetQueryCompletionBlock(queryCompletionBlock func(*CKQueryCursor, unsafe.Pointer))

func (*CKQueryOperation) SetRecordFetchedBlock deprecated

func (o *CKQueryOperation) SetRecordFetchedBlock(recordFetchedBlock func(*CKRecord))

Deprecated: Use recordMatchedBlock instead, which surfaces per-record errors

func (*CKQueryOperation) SetRecordMatchedBlock

func (o *CKQueryOperation) SetRecordMatchedBlock(recordMatchedBlock func(*CKRecordID, *CKRecord, unsafe.Pointer))

func (*CKQueryOperation) SetResultsLimit

func (o *CKQueryOperation) SetResultsLimit(resultsLimit uint)

func (*CKQueryOperation) SetZoneID

func (o *CKQueryOperation) SetZoneID(zoneID *CKRecordZoneID)

func (*CKQueryOperation) ZoneID

func (o *CKQueryOperation) ZoneID() *CKRecordZoneID

The ID of the record zone that contains the records to search. The value of this property limits the scope of the search to only the records in the specified record zone. If you don't specify a record zone, the search includes all record zones. When you create an operation using the “CKQueryOperation/init(cursor:)“ method, this property's value is `nil` and CloudKit ignores any changes that you make to it. When the operation executes, the cursor provides the record zone information from the original search that provides the cursor.

type CKQuerySubscription

type CKQuerySubscription struct {
	CKSubscription
}

A subscription that generates push notifications when CloudKit modifies records that match a predicate.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckquerysubscription

func CKQuerySubscriptionFromID

func CKQuerySubscriptionFromID(id objc.ID) *CKQuerySubscription

func (*CKQuerySubscription) InitWithCoder

func (o *CKQuerySubscription) InitWithCoder(aDecoder *foundation.NSCoder) *CKQuerySubscription

Creates a query-based subscription from a serialized instance.

func (*CKQuerySubscription) InitWithRecordTypePredicateOptions

func (o *CKQuerySubscription) InitWithRecordTypePredicateOptions(recordType *foundation.NSString, predicate *foundation.NSPredicate, querySubscriptionOptions CKQuerySubscriptionOptions) *CKQuerySubscription

Creates a query-based subscription that queries records of a specific type. Deprecated: since macOS 10.12.

func (*CKQuerySubscription) InitWithRecordTypePredicateSubscriptionIDOptions

func (o *CKQuerySubscription) InitWithRecordTypePredicateSubscriptionIDOptions(recordType *foundation.NSString, predicate *foundation.NSPredicate, subscriptionID *foundation.NSString, querySubscriptionOptions CKQuerySubscriptionOptions) *CKQuerySubscription

Creates a named query-based subscription that queries records of a specific type.

func (*CKQuerySubscription) Predicate

func (o *CKQuerySubscription) Predicate() *foundation.NSPredicate

The matching criteria to apply to records. A query-based subscription uses its search predicate to identify potential matches for records. It combines the predicate information with the value in the “CKQuerySubscription/querySubscriptionOptions“ property to determine when to send a push notification to the app. The search predicate defines the records that the subscription object monitors for changes. The system only uses the property's value when the “CKSubscription/subscriptionType“ property is “CKSubscription/SubscriptionType/query“. Otherwise, the system ignores it.

func (*CKQuerySubscription) QuerySubscriptionOptions

func (o *CKQuerySubscription) QuerySubscriptionOptions() CKQuerySubscriptionOptions

Options that define the behavior of the subscription. Set the value of this property at initialization time. When you configure a query-based subscription, use one of the following values: - “CKQuerySubscription/Options/firesOnRecordCreation“ - “CKQuerySubscription/Options/firesOnRecordUpdate“ - “CKQuerySubscription/Options/firesOnRecordDeletion“ If you don't set an option, the system throws an <doc://com.apple.documentation/documentation/foundation/nsexceptionname/invalidargumentexception>.

func (*CKQuerySubscription) RecordType

func (o *CKQuerySubscription) RecordType() *foundation.NSString

The type of record that the subscription queries.

func (*CKQuerySubscription) SetZoneID

func (o *CKQuerySubscription) SetZoneID(zoneID *CKRecordZoneID)

func (*CKQuerySubscription) ZoneID

func (o *CKQuerySubscription) ZoneID() *CKRecordZoneID

The ID of the record zone that the subscription queries. This property applies to query-based subscriptions and zone-based subscriptions. Specifying a record zone ID limits the scope of the query to only the records in that zone. For zone-based subscriptions, the query includes all records in the specified record zone. For a query-based subscription, the query includes only records of a specific type in the specified record zone. For zone-based subscriptions, CloudKit sets this property's value automatically. For all other subscription types, the default value is `nil`. If you want to scope your query-based subscription to a specific record zone, you must assign a value explicitly.

type CKQuerySubscriptionOptions

type CKQuerySubscriptionOptions uint64

Configuration options for a query subscription.

const (
	// An option that instructs CloudKit to send a push notification when it creates a record that matches a subscription's criteria.
	CKQuerySubscriptionOptionsFiresOnRecordCreation CKQuerySubscriptionOptions = 1
	// An option that instructs CloudKit to send a push notification when it modifies a record that matches a subscription's criteria.
	CKQuerySubscriptionOptionsFiresOnRecordUpdate CKQuerySubscriptionOptions = 2
	// An option that instructs CloudKit to send a push notification when it deletes a record that matches a subscription's criteria.
	CKQuerySubscriptionOptionsFiresOnRecordDeletion CKQuerySubscriptionOptions = 4
	// An option that instructs CloudKit to send a push notification only once. You combine this option with one or more of the other subscription options. This option applies only to query-based subscriptions. CloudKit deletes the subscription after it sends the push notification. If you want to generate subsequent push notifications using the same criteria, create and save a new subscription.
	CKQuerySubscriptionOptionsFiresOnce CKQuerySubscriptionOptions = 8
)

func (CKQuerySubscriptionOptions) String

type CKRecord

type CKRecord struct {
	foundation.NSObject
}

A collection of key-value pairs that store your app’s data.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckrecord

func CKRecordFromID

func CKRecordFromID(id objc.ID) *CKRecord

func (*CKRecord) AllKeys

func (o *CKRecord) AllKeys() *foundation.NSArray[*foundation.NSString]

Returns an array of the record’s keys.

func (*CKRecord) AllTokens

func (o *CKRecord) AllTokens() *foundation.NSArray[*foundation.NSString]

Returns an array of strings to use for full-text searches of the field’s string-based values.

func (*CKRecord) ChangedKeys

func (o *CKRecord) ChangedKeys() *foundation.NSArray[*foundation.NSString]

Returns an array of keys with recent changes to their values.

func (*CKRecord) CreationDate

func (o *CKRecord) CreationDate() *foundation.NSDate

The time when CloudKit first saves the record to the server. The creation date reflects the time when CloudKit creates a record on the server with the current record's ID. For new instances of this class, the value of this property is initially `nil`. When you save the record to the server, the value updates with the creation date for the record.

func (*CKRecord) CreatorUserRecordID

func (o *CKRecord) CreatorUserRecordID() *CKRecordID

The ID of the user who creates the record. Use this property's value to retrieve the user record for the user who creates this record. Every user of the app has a unique user record that is empty by default. Apps can add data to the user record on behalf of the user, but don't store sensitive data in it.

func (*CKRecord) EncodeSystemFieldsWithCoder

func (o *CKRecord) EncodeSystemFieldsWithCoder(coder *foundation.NSCoder)

Encodes the record’s system fields using the specified archiver.

func (*CKRecord) EncryptedValues

func (o *CKRecord) EncryptedValues() CKRecordKeyValueSetting

func (*CKRecord) InitWithRecordType

func (o *CKRecord) InitWithRecordType(recordType *foundation.NSString) *CKRecord

Creates a new record of the specified type.

func (*CKRecord) InitWithRecordTypeRecordID

func (o *CKRecord) InitWithRecordTypeRecordID(recordType *foundation.NSString, recordID *CKRecordID) *CKRecord

Creates a record using an ID that you provide.

func (*CKRecord) InitWithRecordTypeZoneID

func (o *CKRecord) InitWithRecordTypeZoneID(recordType *foundation.NSString, zoneID *CKRecordZoneID) *CKRecord

Creates a record in the specified zone.

func (*CKRecord) LastModifiedUserRecordID

func (o *CKRecord) LastModifiedUserRecordID() *CKRecordID

The ID of the user who most recently modified the record. Use this property's value to retrieve the user record of the user who most recently modified this record. Every user of the app has a unique user record that is empty by default. Apps can add data to the user record on behalf of the user, but don't store sensitive data in it.

func (*CKRecord) ModificationDate

func (o *CKRecord) ModificationDate() *foundation.NSDate

The most recent time that CloudKit saved the record to the server. The modification date reflects the most recent time that CloudKit saved a record with the current record's ID to the server. For new instances of this class, the value of this property is initially `nil`. When you save the record to the server, the value updates with the modification date for the record.

func (*CKRecord) ObjectForKey

func (o *CKRecord) ObjectForKey(key *foundation.NSString) CKRecordValue

Returns the object that the record stores for the specified key.

func (*CKRecord) ObjectForKeyedSubscript

func (o *CKRecord) ObjectForKeyedSubscript(key *foundation.NSString) CKRecordValue

Returns the object that the record stores for the specified key.

func (*CKRecord) Parent

func (o *CKRecord) Parent() *CKReference

A reference to the record's parent record. Use parent references to inform CloudKit about the hierarchy of your records. CloudKit shares the hierarchy when a “CKShare“ includes a referenced record. Add relationships between records as you create them, even if you don't plan to share them. This allows you to manage the sharing of a hierarchy by only modifying the root record's “CKRecord/share“ reference. To indicate that a record belongs to its parent, set this property to a reference that points to the parent record. The reference must use the “CKRecord/ReferenceAction/none“ action or CloudKit throws an exception. The parent record must exist on the server when you save the child, or you must include the record in the same save operation. Otherwise, the operation fails.

func (*CKRecord) RecordChangeTag

func (o *CKRecord) RecordChangeTag() *foundation.NSString

The server change token for the record. When you fetch a record from the server, you get the current version of that record as it exists on the server. However, at any time after you fetch a record, other users might save a newer version of it to the server. Every time CloudKit saves a record, the server updates the record's change token to a new value. When you save your copy of the record, the server compares your record's token with the token on the server. If the two tokens match, the server interprets that you modified the latest version of the record and that it can apply your changes immediately. If the two tokens don't match, the server checks your app's save policy to determine how to proceed. In your own code, you can use change tokens to distinguish between two different versions of the same record. - Note: In some situations, setting a record as the parent of another record can cause the `recordChangeTag` to update on the parent record. This usually occurs when you save the child record.

func (*CKRecord) RecordID

func (o *CKRecord) RecordID() *CKRecordID

The unique ID of the record. The system sets the ID of a new record at initialization time. If you use the “CKRecord/init(recordType:recordID:)“ method to initialize the record, the ID derives from the “CKRecord/ID“ object you provide. In all other cases, the record generates a UUID and bases its ID on that value. The ID of a record never changes during its lifetime. When you save a new record object to the server, the server validates the uniqueness of the record, but returns an error only if the save policy calls for it. Specifically, it returns an error when the save policy is “CKModifyRecordsOperation/RecordSavePolicy/ifServerRecordUnchanged“, which is the default. For all other save policies, the server overwrites the contents of the existing record.

func (*CKRecord) RecordType

func (o *CKRecord) RecordType() *foundation.NSString

The value that your app defines to identify the type of record. Use this value to differentiate between different record types in your app. The value is primarily for your benefit, so choose record types that represent the data in the corresponding records. CloudKit provides two system-defined record types: | Record Type | Description | |---|---| | “CKRecordTypeUserRecord-49k30“ | Identifies records that represent users. | | “CKRecordTypeShare-8b6yt“ | Identifies records that the user shares. |

func (*CKRecord) SetObjectForKey

func (o *CKRecord) SetObjectForKey(object CKRecordValue, key *foundation.NSString)

Stores an object in the record using the specified key.

func (*CKRecord) SetObjectForKeyedSubscript

func (o *CKRecord) SetObjectForKeyedSubscript(object CKRecordValue, key *foundation.NSString)

Stores an object in the record using the specified key.

func (*CKRecord) SetParent

func (o *CKRecord) SetParent(parent *CKReference)

func (*CKRecord) SetParentReferenceFromRecord

func (o *CKRecord) SetParentReferenceFromRecord(parentRecord *CKRecord)

Creates and sets a reference object for a parent from its record.

func (*CKRecord) SetParentReferenceFromRecordID

func (o *CKRecord) SetParentReferenceFromRecordID(parentRecordID *CKRecordID)

Creates and sets a reference object for a parent from the parent’s record ID.

func (*CKRecord) Share

func (o *CKRecord) Share() *CKReference

A reference to the share object that determines the share status of the record. CloudKit clears this property's value when it deletes the corresponding “CKShare“ object on the server. Send this record in the same batch operation as the share object you're deleting, and this property updates accordingly. CloudKit only supports sharing in zones with the `CKRecordZoneCapabilitySharing` capability. The default zone doesn't support sharing. If any records have a parent reference to this record, CloudKit implicitly shares them along with this record. - Note: Records in a hierarchy must only exist within one share. If a child record in a hierarchy already has a share reference, you get a `CKErrorAlreadyShared` error if you try to share any of that record's parents.

type CKRecordID

type CKRecordID struct {
	foundation.NSObject
}

An object that uniquely identifies a record in a database.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckrecordid

func CKRecordIDFromID

func CKRecordIDFromID(id objc.ID) *CKRecordID

func (*CKRecordID) InitWithRecordName

func (o *CKRecordID) InitWithRecordName(recordName *foundation.NSString) *CKRecordID

Creates a new record ID with the specified name in the default zone. - Parameters: - recordName: The name that identifies the record. The string must contain only ASCII characters, must not exceed 255 characters, and must not start with an underscore. If you specify an empty string for this parameter, the method throws an exception. - Returns: An initialized record ID object. Use this method when you're creating or searching for records in the default zone.

func (*CKRecordID) InitWithRecordNameZoneID

func (o *CKRecordID) InitWithRecordNameZoneID(recordName *foundation.NSString, zoneID *CKRecordZoneID) *CKRecordID

Creates a new record ID with the specified name and zone information.

func (*CKRecordID) RecordName

func (o *CKRecordID) RecordName() *foundation.NSString

The unique name of the record. For share records that manage a shared record zone, this property's value is always “CKRecordNameZoneWideShare“.

func (*CKRecordID) ZoneID

func (o *CKRecordID) ZoneID() *CKRecordZoneID

The ID of the zone that contains the record.

type CKRecordKeyValueSetting

type CKRecordKeyValueSetting interface {
	ObjectForKey(key *foundation.NSString) CKRecordValue
	SetObjectForKey(object CKRecordValue, key *foundation.NSString)
	ObjectForKeyedSubscript(key *foundation.NSString) CKRecordValue
	SetObjectForKeyedSubscript(object CKRecordValue, key *foundation.NSString)
	AllKeys() *foundation.NSArray[*foundation.NSString]
	ChangedKeys() *foundation.NSArray[*foundation.NSString]
}

CKRecordKeyValueSetting wraps the ObjC protocol CKRecordKeyValueSetting.

type CKRecordSavePolicy

type CKRecordSavePolicy int64

Constants that indicate which policy to apply when saving records.

const (
	// A policy that instructs CloudKit to only proceed if the record's change tag matches that of the server's copy. The server maintains a change tag for each record automatically. When you fetch a record, that change tag accompanies the rest of the record's data. If the change tag in your local record matches the change tag of the record on the server, the save operation proceeds normally. If the server record contains a newer change tag, CloudKit doesn't save the record and reports a “CKError/Code/serverRecordChanged“ error. - Note: A “CKShare“ record is always saved with policy `ifServerRecordUnchanged`, regardless of an operation's “CKModifyRecordsOperation/savePolicy“.
	CKRecordSaveIfServerRecordUnchanged CKRecordSavePolicy = 0
	// A policy that instructs CloudKit to save only the fields of a record that contain changes. - Important: This policy doesn't compare record change tags. To only save changes to the most recent version of a record, use “CKModifyRecordsOperation/RecordSavePolicy/ifServerRecordUnchanged“ instead.
	CKRecordSaveChangedKeys CKRecordSavePolicy = 1
	// A policy that instructs CloudKit to save all keys of a record, even those without changes. - Important: This policy doesn't compare record change tags. To only save changes to the most recent version of a record, use “CKModifyRecordsOperation/RecordSavePolicy/ifServerRecordUnchanged“ instead. This policy causes CloudKit to overwrite any existing values on the server. It's possible for a server record to contain keys that aren't present locally. Another client might add keys to the record after you fetch it. Also, if you use the “CKFetchRecordsOperation/desiredKeys-34l1l“ property to request a subset of keys during a fetch operation, saving that same record modifies only those keys that you include in the fetch and any keys you add to the record after that.
	CKRecordSaveAllKeys CKRecordSavePolicy = 2
)

func (CKRecordSavePolicy) String

func (e CKRecordSavePolicy) String() string

type CKRecordValue

type CKRecordValue interface {
}

CKRecordValue wraps the ObjC protocol CKRecordValue.

type CKRecordZone

type CKRecordZone struct {
	foundation.NSObject
}

A database partition that contains related records.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckrecordzone

func CKRecordZoneDefaultRecordZone

func CKRecordZoneDefaultRecordZone() *CKRecordZone

Returns the default record zone.

func CKRecordZoneFromID

func CKRecordZoneFromID(id objc.ID) *CKRecordZone

func (*CKRecordZone) Capabilities

func (o *CKRecordZone) Capabilities() CKRecordZoneCapabilities

The capabilities that the zone supports. The server determines the capabilities of the zone and sets the value of this property when you save the record zone. Always check this property before performing tasks that require a specific capability. Default zones don't support any special capabilities. Custom zones in a private database support the options that “CKRecordZone/Capabilities“ provides.

func (*CKRecordZone) EncryptionScope

func (o *CKRecordZone) EncryptionScope() CKRecordZoneEncryptionScope

The encryption scope determines the granularity at which CloudKit stores encryption keys within the zone. Zone encryption scope defaults to `CKRecordZoneEncryptionScopePerRecord` and can only be modified before zone creation. Attempting to change the encryption scope of an existing zone is invalid and results in an error. Zones using `CKRecordZoneEncryptionScopePerZone` can only use zone-wide sharing and are not compatible with older device OS versions. Refer to `CKRecordZoneEncryptionScope` for more info.

func (*CKRecordZone) InitWithZoneID

func (o *CKRecordZone) InitWithZoneID(zoneID *CKRecordZoneID) *CKRecordZone

Creates a record zone object with the specified zone ID.

func (*CKRecordZone) InitWithZoneName

func (o *CKRecordZone) InitWithZoneName(zoneName *foundation.NSString) *CKRecordZone

Creates a record zone object with the specified zone name.

func (*CKRecordZone) SetEncryptionScope

func (o *CKRecordZone) SetEncryptionScope(encryptionScope CKRecordZoneEncryptionScope)

func (*CKRecordZone) Share

func (o *CKRecordZone) Share() *CKReference

A reference to the record zone's share record. CloudKit sets this property only for fetched record zones that contain a share record; otherwise, it's `nil`. To share a record zone, create a share record using the “CKShare/init(recordZoneID:)“ method and then save it to the server. Shared record zones must have the “CKRecordZone/Capabilities/zoneWideSharing“ capability, which CloudKit enables by default for new custom record zones in the user's private database. A record zone, and the records it contains, can take part in only a single share. CloudKit returns an error if you attempt to share an already-shared record zone, or if that record zone contains previously shared records. Record zone sharing errors include the following: - “CKError/Code/serverRecordChanged“, which CloudKit returns if you try to share an already-shared record zone. - “CKError/Code/serverRejectedRequest“, which CloudKit returns if you try to share a record hierarchy from an already-shared record zone. - “CKError/Code/invalidArguments“, which CloudKit returns if you try to share a record zone that contains one or more shared hierarchies.

func (*CKRecordZone) ZoneID

func (o *CKRecordZone) ZoneID() *CKRecordZoneID

The unique ID of the zone. The zone ID contains the name of the zone and the name of the user who owns the zone. Use this property to access both of those values.

type CKRecordZoneCapabilities

type CKRecordZoneCapabilities uint64

The capabilities that a record zone supports.

const (
	// A capability for fetching only the changed records from a zone. This capability makes the creation of offline caches more efficient. Instead of fetching the entire record every time, use “CKFetchRecordZoneChangesOperation“ to fetch only the changed values, and use the data it returns to update your cache. This minimizes the amount of data you receive from the server.
	CKRecordZoneCapabilityFetchChanges CKRecordZoneCapabilities = 1
	// A capability that allows atomic changes of multiple records. When you use a “CKModifyRecordsOperation“ object to save records, if the server is unable to save the changes for one record, it doesn't save the changes for any of the records. Combining this capability with the “CKModifyRecordsOperation/RecordSavePolicy/ifServerRecordUnchanged“ policy of the operation object prevents your app from overwriting changes to a group of records if one or more of the records on the server has recent changes.
	CKRecordZoneCapabilityAtomic CKRecordZoneCapabilities = 2
	// A capability for sharing a specific hierarchy of records. CloudKit allows you to share record hierarchies from custom record zones that you create in the user's private database. For more information, see <doc:shared-records>.
	CKRecordZoneCapabilitySharing CKRecordZoneCapabilities = 4
	// A capability for sharing the entire contents of a record zone. CloudKit allows you to share custom record zones that you create in the user's private database. For more information, see <doc:shared-records>.
	CKRecordZoneCapabilityZoneWideSharing CKRecordZoneCapabilities = 8
)

func (CKRecordZoneCapabilities) String

func (e CKRecordZoneCapabilities) String() string

type CKRecordZoneEncryptionScope

type CKRecordZoneEncryptionScope int64
const (
	// Zone uses per-record encryption keys for any encrypted values on a record or share. This is the default encryption scope for a record zone.
	CKRecordZoneEncryptionScopePerRecord CKRecordZoneEncryptionScope = 0
	// Zone uses per-zone encryption keys for encrypted values across all records and the zone-wide share, if present. This is an optional optimization that can reduce the overall storage used by encryption keys in a zone. Note that: - Record zones using per-zone encryption only support zone-wide sharing. - Encryption scope can only be assigned at zone creation and cannot be changed for the lifetime of the zone. - The server does not return zones using per-zone encryption to device OS versions older than the corresponding API availability version. - An older OS trying to overwrite an existing zone using per-zone encryption due to a naming collision results in a `.serverRejectedRequest` error. - On device OS upgrade, your application is responsible for fetching database changes via `CKFetchDatabaseChangesOperation` with a nil sync token to verify it has received all the zones available to it from the server.
	CKRecordZoneEncryptionScopePerZone CKRecordZoneEncryptionScope = 1
)

func (CKRecordZoneEncryptionScope) String

type CKRecordZoneID

type CKRecordZoneID struct {
	foundation.NSObject
}

An object that uniquely identifies a record zone in a database.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckrecordzoneid

func CKRecordZoneIDFromID

func CKRecordZoneIDFromID(id objc.ID) *CKRecordZoneID

func (*CKRecordZoneID) InitWithZoneNameOwnerName

func (o *CKRecordZoneID) InitWithZoneNameOwnerName(zoneName *foundation.NSString, ownerName *foundation.NSString) *CKRecordZoneID

Creates a record zone ID with the specified name and owner.

func (*CKRecordZoneID) OwnerName

func (o *CKRecordZoneID) OwnerName() *foundation.NSString

The ID of the user who owns the record zone.

func (*CKRecordZoneID) ZoneName

func (o *CKRecordZoneID) ZoneName() *foundation.NSString

The unique name of the record zone.

type CKRecordZoneNotification

type CKRecordZoneNotification struct {
	CKNotification
}

A notification that triggers when the contents of a record zone change.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckrecordzonenotification

func CKRecordZoneNotificationFromID

func CKRecordZoneNotificationFromID(id objc.ID) *CKRecordZoneNotification

func (*CKRecordZoneNotification) DatabaseScope

func (o *CKRecordZoneNotification) DatabaseScope() CKDatabaseScope

The type of database for the record zone. This property's value is one of the constants that “CKDatabase/Scope“ defines.

func (*CKRecordZoneNotification) RecordZoneID

func (o *CKRecordZoneNotification) RecordZoneID() *CKRecordZoneID

The ID of the record zone that has changes.

type CKRecordZoneSubscription

type CKRecordZoneSubscription struct {
	CKSubscription
}

A subscription that generates push notifications when CloudKit modifies records in a specific record zone.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckrecordzonesubscription

func CKRecordZoneSubscriptionFromID

func CKRecordZoneSubscriptionFromID(id objc.ID) *CKRecordZoneSubscription

func (*CKRecordZoneSubscription) InitWithCoder

Creates a zone-based subscription from a serialized instance.

func (*CKRecordZoneSubscription) InitWithZoneID

Creates a subscription for all records in the specified record zone. Deprecated: since macOS 10.12.

func (*CKRecordZoneSubscription) InitWithZoneIDSubscriptionID

func (o *CKRecordZoneSubscription) InitWithZoneIDSubscriptionID(zoneID *CKRecordZoneID, subscriptionID *foundation.NSString) *CKRecordZoneSubscription

Creates a named subscription for all records in the specified record zone.

func (*CKRecordZoneSubscription) RecordType

func (o *CKRecordZoneSubscription) RecordType() *foundation.NSString

The type of record that the subscription queries.

func (*CKRecordZoneSubscription) SetRecordType

func (o *CKRecordZoneSubscription) SetRecordType(recordType *foundation.NSString)

func (*CKRecordZoneSubscription) ZoneID

The ID of the record zone that the subscription queries. This property applies to query-based subscriptions and zone-based subscriptions. Specifying a record zone ID limits the scope of the query to only the records in that zone. For zone-based subscriptions, the query includes all records in the specified record zone. For a query-based subscription, the query includes only records of a specific type in the specified record zone. For zone-based subscriptions, CloudKit sets this property's value automatically. For all other subscription types, the default value is `nil`. If you want to scope your query-based subscription to a specific record zone, you must assign a value explicitly.

type CKReference

type CKReference struct {
	foundation.NSObject
}

A relationship between two records in a record zone.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckreference

func CKReferenceFromID

func CKReferenceFromID(id objc.ID) *CKReference

func (*CKReference) InitWithRecordAction

func (o *CKReference) InitWithRecordAction(record *CKRecord, action CKReferenceAction) *CKReference

Creates a reference object that points to the specified record object. - Parameters: - record: The target record of the reference. - action: The ownership options to use for the records. If you specify the “CKRecord/ReferenceAction/deleteSelf“ option, the object that the `recordID` parameter references becomes the owner of (or acts as the parent of) any objects that use this reference object. For a list of possible values, see “CKRecord/ReferenceAction“. - Returns: An initialized reference object that points to the specified record. Use this method to initialize a reference to a local record object. You can reference a local record that you create, or one that you fetch from the server. When you create a reference object for use in a search predicate, the predicate ignores the value in the `action` parameter. Search predicates use only the ID of the record during their comparison.

func (*CKReference) InitWithRecordIDAction

func (o *CKReference) InitWithRecordIDAction(recordID *CKRecordID, action CKReferenceAction) *CKReference

Creates a reference object that points to the record with the specified ID. - Parameters: - recordID: The ID of the target record. This method throws an exception if you specify `nil` for this parameter. - action: The ownership option use between the target record and any records that incorporate this reference object. If you specify the “CKRecord/ReferenceAction/deleteSelf“ option, the record that the `recordID` parameter references becomes the owner of (or acts as the parent of) any objects that use this reference object. For a list of possible values, see “CKRecord/ReferenceAction“. - Returns: An initialized reference object that points to the specified record. Use this method when you have only the ID of the record for the target of a link. You might use this method if you save only the ID of the record to a local data cache. When you create a reference object for use in a search predicate, the predicate ignores the value in the `action` parameter. Search predicates use only the ID of the record during their comparison.

func (*CKReference) RecordID

func (o *CKReference) RecordID() *CKRecordID

The ID of the referenced record. Use the ID in this property to fetch the record on the other end of the link.

func (*CKReference) ReferenceAction

func (o *CKReference) ReferenceAction() CKReferenceAction

The ownership behavior for the records. The value in this property determines which action, if any, to take when deleting the target of the reference object — that is, the object that the “CKRecord/Reference/recordID“ property points to. When this property is “CKRecord/ReferenceAction/deleteSelf“, deleting the target object deletes any records that contain that reference in one of their fields. When this property is “CKRecord/ReferenceAction/none“, deleting the target object doesn't delete any additional objects.

type CKReferenceAction

type CKReferenceAction uint64
const (
	// A reference action that has no cascading behavior. No action occurs when you delete a record that the current record references. Deleting a parent record doesn't delete that record's children. The `CKReference` object still contains the ID of the deleted record and doesn't update.
	CKReferenceActionNone CKReferenceAction = 0
	// A reference action that cascades deletions. CloudKit deletes any records that contain `CKReference` objects pointing to the current record. The deletion of the additional records can trigger further deletions as the action cascades. The deletions are asynchronous in the default zone and immediate in a custom zone.
	CKReferenceActionDeleteSelf CKReferenceAction = 1
)

func (CKReferenceAction) String

func (e CKReferenceAction) String() string

type CKServerChangeToken

type CKServerChangeToken struct {
	foundation.NSObject
}

An opaque token that represents a specific point in a database’s history.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckserverchangetoken

func CKServerChangeTokenFromID

func CKServerChangeTokenFromID(id objc.ID) *CKServerChangeToken

type CKShare

type CKShare struct {
	CKRecord
}

A specialized record type that manages a collection of shared records.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckshare

func CKShareFromID

func CKShareFromID(id objc.ID) *CKShare

func (*CKShare) AddParticipant

func (o *CKShare) AddParticipant(participant *CKShareParticipant)

Adds a participant to the share.

func (*CKShare) AllowsAccessRequests

func (o *CKShare) AllowsAccessRequests() bool

Indicates whether uninvited users can request access to this share. By default, this property is `NO`. When this property is `YES`, uninvited users can request access to the share if they discover the share URL. When this property is `NO`, the server prevents uninvited users from requesting access and does not indicate whether the share exists. Only the share owner or an administrator can modify this property. If another participant attempts to modify this property, CloudKit throws an exception.

func (*CKShare) BlockRequesters

func (o *CKShare) BlockRequesters(requesters *foundation.NSArray[*CKShareAccessRequester])

Blocks specified users from requesting access to this share.

func (*CKShare) BlockedIdentities

func (o *CKShare) BlockedIdentities() *foundation.NSArray[*CKShareBlockedIdentity]

A list of users blocked from requesting access to this share. Identities remain in this list until an owner or administrator calls “CloudKit/CKShare/unblockIdentities(_:)“.

func (*CKShare) CurrentUserParticipant

func (o *CKShare) CurrentUserParticipant() *CKShareParticipant

The participant that represents the current user.

func (*CKShare) DenyRequesters

func (o *CKShare) DenyRequesters(requesters *foundation.NSArray[*CKShareAccessRequester])

Denies access requests from specified users.

func (*CKShare) InitWithCoder

func (o *CKShare) InitWithCoder(aDecoder *foundation.NSCoder) *CKShare

Creates a share from a serialized instance.

func (*CKShare) InitWithRecordZoneID

func (o *CKShare) InitWithRecordZoneID(recordZoneID *CKRecordZoneID) *CKShare

Creates a new share for the specified record zone.

func (*CKShare) InitWithRootRecord

func (o *CKShare) InitWithRootRecord(rootRecord *CKRecord) *CKShare

Creates a new share for the specified record.

func (*CKShare) InitWithRootRecordShareID

func (o *CKShare) InitWithRootRecordShareID(rootRecord *CKRecord, shareID *CKRecordID) *CKShare

Creates a new share for the specified record and record ID.

func (*CKShare) OneTimeURLForParticipantID

func (o *CKShare) OneTimeURLForParticipantID(participantID *foundation.NSString) *foundation.NSURL

Invitation URLs that any receiver can use to claim the associated participantID and join the share.

func (*CKShare) Owner

func (o *CKShare) Owner() *CKShareParticipant

The participant that represents the share's owner.

func (*CKShare) Participants

func (o *CKShare) Participants() *foundation.NSArray[*CKShareParticipant]

An array that contains the share's participants. The property's value contains all of the share's participants that the current user has permissions to see. At a minimum, it includes the share's owner and the current user.

func (*CKShare) PublicPermission

func (o *CKShare) PublicPermission() CKShareParticipantPermission

The permission for anyone with access to the share's URL. Setting this property's value to be more permissive than “CKShare/ParticipantPermission/none“ allows any user with the share's URL to join. CloudKit removes all public participants when you save the share if you set the property's value to “CKShare/ParticipantPermission/none“. The default value is “CKShare/ParticipantPermission/none“

func (*CKShare) RemoveParticipant

func (o *CKShare) RemoveParticipant(participant *CKShareParticipant)

Removes a participant from the share.

func (*CKShare) Requesters

func (o *CKShare) Requesters() *foundation.NSArray[*CKShareAccessRequester]

A list of all uninvited users who have requested access to this share. When an originator or administrator allows share access requests, uninvited users can request to join the share. All pending access requests appear in this array. CloudKit returns each requester with name components and either an email or phone number. Either share owners or administrators can respond to these access requests. ### Responding to Access Requests: - **Approve Requesters:** - Fetch the participant information by running “CKFetchShareParticipantsOperation“ with the requester's “CKShareAccessRequester/participantLookupInfo“. - Add the resulting participant to the share. - **Deny Requesters:** - Use “CloudKit/CKShare/denyRequesters(_:)“ to remove the requester from the requesters list. - **Block Requesters:** - Use “CloudKit/CKShare/blockRequesters(_:)“ to block requesters. - Blocking a requester prevents them from sending future access requests to the share.

func (*CKShare) SetAllowsAccessRequests

func (o *CKShare) SetAllowsAccessRequests(allowsAccessRequests bool)

func (*CKShare) SetPublicPermission

func (o *CKShare) SetPublicPermission(publicPermission CKShareParticipantPermission)

func (*CKShare) URL

func (o *CKShare) URL() *foundation.NSURL

The Uniform Resource Locator (URL) for inviting participants to the share. This property is only available after saving a share record to the server. This URL is stable and persists across shares and reshares of the same root record.

func (*CKShare) UnblockIdentities

func (o *CKShare) UnblockIdentities(blockedIdentities *foundation.NSArray[*CKShareBlockedIdentity])

Unblocks previously blocked users, allowing them to request access again.

type CKShareAccessRequester

type CKShareAccessRequester struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckshareaccessrequester

func CKShareAccessRequesterFromID

func CKShareAccessRequesterFromID(id objc.ID) *CKShareAccessRequester

func (*CKShareAccessRequester) Contact

func (o *CKShareAccessRequester) Contact() objc.ID

A displayable CNContact representing the requester. If the requester doesn't exist in the user's contacts or is not accessible, returns a newly created `CNContact`. This provides formatted requester information suitable for display in the application's UI.

func (*CKShareAccessRequester) ParticipantLookupInfo

func (o *CKShareAccessRequester) ParticipantLookupInfo() *CKUserIdentityLookupInfo

Lookup information for the requester. Use this lookup info with “CKFetchShareParticipantsOperation“ to fetch the corresponding participant. Once fetched, add the participant to the share to approve the requester.

func (*CKShareAccessRequester) UserIdentity

func (o *CKShareAccessRequester) UserIdentity() *CKUserIdentity

The identity of the user requesting access to the share.

type CKShareBlockedIdentity

type CKShareBlockedIdentity struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckshareblockedidentity

func CKShareBlockedIdentityFromID

func CKShareBlockedIdentityFromID(id objc.ID) *CKShareBlockedIdentity

func (*CKShareBlockedIdentity) Contact

func (o *CKShareBlockedIdentity) Contact() objc.ID

A displayable CNContact representing the blocked user. If the blocked identity does not exist in the user's contacts or is not accessible, returns a newly created `CNContact`. This provides formatted blocked identity information suitable for display in the application's UI.

func (*CKShareBlockedIdentity) UserIdentity

func (o *CKShareBlockedIdentity) UserIdentity() *CKUserIdentity

The identity of the user who has been blocked from requesting access to the share.

type CKShareMetadata

type CKShareMetadata struct {
	foundation.NSObject
}

An object that describes a shared record’s metadata.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksharemetadata

func CKShareMetadataFromID

func CKShareMetadataFromID(id objc.ID) *CKShareMetadata

func (*CKShareMetadata) ContainerIdentifier

func (o *CKShareMetadata) ContainerIdentifier() *foundation.NSString

The ID of the share's container.

func (*CKShareMetadata) HierarchicalRootRecordID

func (o *CKShareMetadata) HierarchicalRootRecordID() *CKRecordID

The record ID of the shared hierarchy's root record. CloudKit populates this property only for metadata that belongs to a shared record hierarchy. If the metadata is part of a shared record zone, the property is `nil`. This is because, unlike a shared record hierarchy, a shared record zone doesn't have a nominated root record.

func (*CKShareMetadata) OwnerIdentity

func (o *CKShareMetadata) OwnerIdentity() *CKUserIdentity

The identity of the share's owner.

func (*CKShareMetadata) ParticipantPermission

func (o *CKShareMetadata) ParticipantPermission() CKShareParticipantPermission

The share's permissions for the user who retrieves the metadata.

func (*CKShareMetadata) ParticipantRole

func (o *CKShareMetadata) ParticipantRole() CKShareParticipantRole

The share's participant role for the user who retrieves the metadata.

func (*CKShareMetadata) ParticipantStatus

func (o *CKShareMetadata) ParticipantStatus() CKShareParticipantAcceptanceStatus

The share's participation status for the user who retrieves the metadata.

func (*CKShareMetadata) RootRecord

func (o *CKShareMetadata) RootRecord() *CKRecord

The share's root record. This property contains the root record of the shared record hierarchy if you set the “CKFetchShareMetadataOperation/shouldFetchRootRecord“ property of the operation that fetches the metadata to <doc://com.apple.documentation/documentation/swift/true>. You can specify which fields CloudKit returns by setting the same operation's “CKFetchShareMetadataOperation/rootRecordDesiredKeys-3xrex“ property. The operation ignores the “CKFetchShareMetadataOperation/shouldFetchRootRecord“ and “CKFetchShareMetadataOperation/rootRecordDesiredKeys-3xrex“ properties when fetching a shared record zone's metadata because, unlike a shared record hierarchy, a record zone doesn't have a nominated root record.

func (*CKShareMetadata) RootRecordID

func (o *CKShareMetadata) RootRecordID() *CKRecordID

The record ID of the share's root record. @DeprecationSummary { Use “CKShare/Metadata/hierarchicalRootRecordID“ instead. } CloudKit populates this property only for metadata that belongs to a shared record hierarchy. If the metadata is part of a shared record zone, the property returns `nil`. This is because, unlike a shared record hierarchy, a shared record zone doesn't have a nominated root record. Deprecated: since macOS 13.0.

func (*CKShareMetadata) Share

func (o *CKShareMetadata) Share() *CKShare

The share that owns the metadata.

type CKShareParticipant

type CKShareParticipant struct {
	foundation.NSObject
}

An object that describes a user’s participation in a share.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckshareparticipant

func CKShareParticipantFromID

func CKShareParticipantFromID(id objc.ID) *CKShareParticipant

func CKShareParticipantOneTimeURLParticipant

func CKShareParticipantOneTimeURLParticipant() *CKShareParticipant

Generate a unique URL for inviting a participant without knowing their handle When a participant's email address / phone number / userRecordID isn't known up-front, you can add a “CKShareParticipant/oneTimeURLParticipant“ to the share. Once you save the share, you can get a custom invitation link or one-time URL for the added participant via “CKShare/oneTimeURL(for:)“. Any recipient user can use this custom link to fetch share metadata and accept the share. Note that a one-time URL participant in the “ParticipantAcceptanceStatus/pending“ state has empty “CKUserIdentity/nameComponents“ and a nil “CKUserIdentity/lookupInfo“.

func (*CKShareParticipant) AcceptanceStatus

The current state of the user's acceptance of the share. This property contains the current state of the participant's acceptance of the share. For a list of possible values, see “CKShare/ParticipantAcceptanceStatus“.

func (*CKShareParticipant) DateAddedToShare

func (o *CKShareParticipant) DateAddedToShare() *foundation.NSDate

The date and time when an originator or administrator added this participant to the share. CloudKit sets this timestamp when the share is successfully saved to the server.

func (*CKShareParticipant) IsApprovedRequester

func (o *CKShareParticipant) IsApprovedRequester() bool

Indicates whether the participant was originally a requester that an originator or administrator approved to join the share.

func (*CKShareParticipant) ParticipantID

func (o *CKShareParticipant) ParticipantID() *foundation.NSString

A unique identifier for this participant.

func (*CKShareParticipant) Permission

The participant's permission level for the share. This property controls the permissions that the participant has for the share. For a list of possible values, see “CKShare/ParticipantPermission“.

func (*CKShareParticipant) Role

The participant's role for the share.

func (*CKShareParticipant) SetPermission

func (o *CKShareParticipant) SetPermission(permission CKShareParticipantPermission)

func (*CKShareParticipant) SetRole

func (o *CKShareParticipant) SetRole(role CKShareParticipantRole)

func (*CKShareParticipant) UserIdentity

func (o *CKShareParticipant) UserIdentity() *CKUserIdentity

The identity of the participant. This property contains a reference to the user identity for the share participant.

type CKShareParticipantAcceptanceStatus

type CKShareParticipantAcceptanceStatus int64
const (
	// The participant's status is unknown.
	CKShareParticipantAcceptanceStatusUnknown CKShareParticipantAcceptanceStatus = 0
	// The participant's acceptance of the share request is pending.
	CKShareParticipantAcceptanceStatusPending CKShareParticipantAcceptanceStatus = 1
	// The participant accepted the share request.
	CKShareParticipantAcceptanceStatusAccepted CKShareParticipantAcceptanceStatus = 2
	// The system removed the participant from the share.
	CKShareParticipantAcceptanceStatusRemoved CKShareParticipantAcceptanceStatus = 3
)

func (CKShareParticipantAcceptanceStatus) String

type CKShareParticipantPermission

type CKShareParticipantPermission int64
const (
	// The participant's permissions are unknown.
	CKShareParticipantPermissionUnknown CKShareParticipantPermission = 0
	// The participant doesn't have any permissions for the share.
	CKShareParticipantPermissionNone CKShareParticipantPermission = 1
	// The participant has read-only permissions for the share.
	CKShareParticipantPermissionReadOnly CKShareParticipantPermission = 2
	// The participant has read-and-write permissions for the share.
	CKShareParticipantPermissionReadWrite CKShareParticipantPermission = 3
)

func (CKShareParticipantPermission) String

type CKShareParticipantRole

type CKShareParticipantRole int64

Constants that represent the role of a share’s participant.

const (
	// The participant's role is unknown.
	CKShareParticipantRoleUnknown CKShareParticipantRole = 0
	// The participant is the share's owner. The owner of a share can invite private users.
	CKShareParticipantRoleOwner CKShareParticipantRole = 1
	// The participant has the private role. A private user of a share can access the share.
	CKShareParticipantRolePrivateUser CKShareParticipantRole = 3
	// The participant has the public role. A public user of a share is self-added when accessing the share URL.
	CKShareParticipantRolePublicUser CKShareParticipantRole = 4
	// The participant has the administrator role. An administrator of a share can add and remove participants and change their permissions. CloudKit returns shares with `administrator` participants as read-only to devices running OS versions prior to this role being introduced. CloudKit returns administrator participants on such read-only shares as “CloudKit/CKShareParticipantRole/CKShareParticipantRolePrivateUser“.
	CKShareParticipantRoleAdministrator CKShareParticipantRole = 2
)

func (CKShareParticipantRole) String

func (e CKShareParticipantRole) String() string

type CKShareRequestAccessOperation

type CKShareRequestAccessOperation struct {
	CKOperation
}

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksharerequestaccessoperation

func CKShareRequestAccessOperationFromID

func CKShareRequestAccessOperationFromID(id objc.ID) *CKShareRequestAccessOperation

func (*CKShareRequestAccessOperation) Init

Creates a new, empty share request access operation.

func (*CKShareRequestAccessOperation) InitWithShareURLs

Creates a share request access operation configured with specified share URLs.

func (*CKShareRequestAccessOperation) PerShareAccessRequestCompletionBlock

func (o *CKShareRequestAccessOperation) PerShareAccessRequestCompletionBlock() objc.Block

The closure to execute when CloudKit processes a share access request. The server does not disclose share existence to protect user privacy. This property is a closure that returns no value and has the following parameters: - The URL of the share that was processed. - An error describing why the access request failed, or `nil` if successful. The closure executes once for each URL in the “CKShareRequestAccessOperation/shareURLs“ property. Each time the closure executes, it executes serially with respect to the other closure of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKShareRequestAccessOperation) SetPerShareAccessRequestCompletionBlock

func (o *CKShareRequestAccessOperation) SetPerShareAccessRequestCompletionBlock(perShareAccessRequestCompletionBlock func(*foundation.NSURL, unsafe.Pointer))

func (*CKShareRequestAccessOperation) SetShareRequestAccessCompletionBlock

func (o *CKShareRequestAccessOperation) SetShareRequestAccessCompletionBlock(shareRequestAccessCompletionBlock func(unsafe.Pointer))

func (*CKShareRequestAccessOperation) SetShareURLs

func (o *CKShareRequestAccessOperation) SetShareURLs(shareURLs *foundation.NSArray[*foundation.NSURL])

func (*CKShareRequestAccessOperation) ShareRequestAccessCompletionBlock

func (o *CKShareRequestAccessOperation) ShareRequestAccessCompletionBlock() objc.Block

The closure to execute after CloudKit processes all share access requests. This property is a closure that returns no value and has the following parameter: - An error that contains information about a problem, or `nil` if the system successfully processes the share access requests. The closure executes only once, and represents your final opportunity to process the operation's results. It executes after all share access request completion closures finish. The closure executes serially with respect to the other closures of the operation. The closure reports an error of type “CKError/Code/partialFailure“ when it processes only some of the share access requests successfully. The <doc://com.apple.documentation/documentation/foundation/nserror/userinfo> dictionary of the error contains a “CKPartialErrorsByItemIDKey“ key that has a dictionary as its value. The keys of the dictionary are the URLs of the shares whose access requests can't be processed by the operation. The corresponding values are errors that contain information about the failures. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

func (*CKShareRequestAccessOperation) ShareURLs

The URLs of the shares to request access to. Include multiple URLs to request access to multiple shares simultaneously. The server processes each URL independently.

type CKSharingParticipantAccessOption

type CKSharingParticipantAccessOption uint64

An object that controls participant access options.

const (
	// The permission option the system uses to control whether a user can share publicly.
	CKSharingParticipantAccessOptionAnyoneWithLink CKSharingParticipantAccessOption = 1
	// The permission option the system uses to control whether a user can share privately.
	CKSharingParticipantAccessOptionSpecifiedRecipientsOnly CKSharingParticipantAccessOption = 2
	// The permission option the system uses to control whether a user can share publicly or privately.
	CKSharingParticipantAccessOptionAny CKSharingParticipantAccessOption = 3
)

func (CKSharingParticipantAccessOption) String

type CKSharingParticipantPermissionOption

type CKSharingParticipantPermissionOption uint64

An object that controls participant permission options.

const (
	// The permission option the system uses to control whether a user can grant read-only access.
	CKSharingParticipantPermissionOptionReadOnly CKSharingParticipantPermissionOption = 1
	// The permission option the system uses to control whether a user can grant write access.
	CKSharingParticipantPermissionOptionReadWrite CKSharingParticipantPermissionOption = 2
	// The permission option the system uses to control whether a user can grant read-only or write access.
	CKSharingParticipantPermissionOptionAny CKSharingParticipantPermissionOption = 3
)

func (CKSharingParticipantPermissionOption) String

type CKSubscription

type CKSubscription struct {
	foundation.NSObject
}

An abstract base class for subscriptions.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksubscription

func CKSubscriptionFromID

func CKSubscriptionFromID(id objc.ID) *CKSubscription

func (*CKSubscription) NotificationInfo

func (o *CKSubscription) NotificationInfo() *CKNotificationInfo

The configuration for a subscription's push notifications. If you want the system to display your subscription's push notifications, assign a value to this property. The server uses the configuration you provide to determine the delivery options for notifications. For example, you can specify the text to display to the user, and the sound to play. You can also specify which fields of the record to include in the notification's payload. If you don't assign a value to this property, CloudKit still sends push notifications, but the system doesn't display them to the user. The default value of this property is `nil`.

func (*CKSubscription) SetNotificationInfo

func (o *CKSubscription) SetNotificationInfo(notificationInfo *CKNotificationInfo)

func (*CKSubscription) SubscriptionID

func (o *CKSubscription) SubscriptionID() *foundation.NSString

The subscription's unique identifier. This property's value is the subscription ID that you provide to the `initWithRecordType:predicate:subscriptionID:options:` or `initWithZoneID:subscriptionID:options:` methods when you create the subscription. If you use a different method to create the subscription, CloudKit automatically assigns a UUID as the subscription ID.

func (*CKSubscription) SubscriptionType

func (o *CKSubscription) SubscriptionType() CKSubscriptionType

The behavior that a subscription provides.

type CKSubscriptionType

type CKSubscriptionType int64

Constants that identify a subscription’s behavior.

const (
	// A constant that indicates the subscription is query-based.
	CKSubscriptionTypeQuery CKSubscriptionType = 1
	// A constant that indicates the subscription is zone-based.
	CKSubscriptionTypeRecordZone CKSubscriptionType = 2
	// A constant that indicates the subscription is database-based.
	CKSubscriptionTypeDatabase CKSubscriptionType = 3
)

func (CKSubscriptionType) String

func (e CKSubscriptionType) String() string

type CKSyncEngine

type CKSyncEngine struct {
	foundation.NSObject
}

An object that manages the synchronization of local and remote record data.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncengine

func CKSyncEngineFromID

func CKSyncEngineFromID(id objc.ID) *CKSyncEngine

func (*CKSyncEngine) CancelOperationsWithCompletionHandler

func (o *CKSyncEngine) CancelOperationsWithCompletionHandler(completionHandler func())

Cancels any in-progress or pending sync operations. The sync engine processes cancelation requests asynchronously, meaning it's possible for in-progress operations to complete even after this method returns.

func (*CKSyncEngine) Database

func (o *CKSyncEngine) Database() *CKDatabase

The associated database. Multiple sync engines can run in the same process, each targeting a different database. For example, you may use one sync engine for a person's private database and another for their shared database.

func (*CKSyncEngine) FetchChangesWithCompletionHandler

func (o *CKSyncEngine) FetchChangesWithCompletionHandler(completionHandler func(unsafe.Pointer))

Fetches pending remote changes from the server. - Parameters: - completionHandler: The block to execute when the fetch completes. If the fetch fails, the completion handler's `error` parameter is an object that describes that failure; otherwise, it's `nil`. Use this method to request the sync engine immediately fetches all pending remote changes before your app continues. This isn't necessary in normal use, as the engine automatically syncs your app's records. It is useful, however, in scenarios where you require more control over sync, such as pull-to-refresh or unit tests. - Note: The sync engine invokes the completion handler only after your sync delegate finishes processing all related fetch events.

func (*CKSyncEngine) FetchChangesWithOptionsCompletionHandler

func (o *CKSyncEngine) FetchChangesWithOptionsCompletionHandler(options *CKSyncEngineFetchChangesOptions, completionHandler func(unsafe.Pointer))

Fetches pending remote changes from the server using the specified options. - Parameters: - options: The options to use when fetching changes. For more information, see “CKSyncEngineFetchChangesOptions“. - completionHandler: The block to execute when the fetch completes. If the fetch fails, the completion handler's `error` parameter is an object that describes that failure; otherwise, it's `nil`. Use this method to request the sync engine immediately fetches all pending remote changes before your app continues. This isn't necessary in normal use, as the engine automatically syncs your app's records. It is useful, however, in scenarios where you require more control over sync, such as pull-to-refresh or unit tests. - Note: The sync engine invokes the completion handler only after your sync delegate finishes processing all related fetch events.

func (*CKSyncEngine) InitWithConfiguration

func (o *CKSyncEngine) InitWithConfiguration(configuration *CKSyncEngineConfiguration) *CKSyncEngine

Creates a sync engine with the specified configuration. - Parameters: - configuration: The attributes of the new sync engine, such as the associated database and the object to use as the engine's delegate. For more information, see “CKSyncEngineConfiguration“. - Returns: A configured sync engine.

func (*CKSyncEngine) SendChangesWithCompletionHandler

func (o *CKSyncEngine) SendChangesWithCompletionHandler(completionHandler func(unsafe.Pointer))

Sends pending local changes to the server. - Parameters: - completionHandler: The block to execute when the send completes. If the send fails, the completion handler's `error` parameter is an object that describes that failure; otherwise, it's `nil`. Use this method to request the sync engine sends all pending local changes to the server before your app continues. This isn't necessary in normal use, as the engine automatically syncs your app's records. It is useful, however, in scenarios where you require greater control over sync, such as a "Backup now" button or unit tests. - Note: The sync engine invokes the completion handler only after your sync delegate finishes processing all related send events.

func (*CKSyncEngine) SendChangesWithOptionsCompletionHandler

func (o *CKSyncEngine) SendChangesWithOptionsCompletionHandler(options *CKSyncEngineSendChangesOptions, completionHandler func(unsafe.Pointer))

Sends pending local changes to the server using the specified options. - Parameters: - options: The options to use when sending changes. For more information, see “CKSyncEngineSendChangesOptions“. - completionHandler: The block to execute when the send completes. If the send fails, the completion handler's `error` parameter is an object that describes that failure; otherwise, it's `nil`. Use this method to request the sync engine sends all pending local changes to the server before your app continues. This isn't necessary in normal use, as the engine automatically syncs your app's records. It is useful, however, in scenarios where you require greater control over sync, such as a "Backup now" button or unit tests. - Note: The sync engine invokes the completion handler only after your sync delegate finishes processing all related send events.

func (*CKSyncEngine) State

func (o *CKSyncEngine) State() *CKSyncEngineState

A collection of state properties used to efficiently manage sync engine operation. - SeeAlso: “CKSyncEngineState“

type CKSyncEngineAccountChangeEvent

type CKSyncEngineAccountChangeEvent struct {
	CKSyncEngineEvent
}

The user signed in or out of their account.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncengineaccountchangeevent

func CKSyncEngineAccountChangeEventFromID

func CKSyncEngineAccountChangeEventFromID(id objc.ID) *CKSyncEngineAccountChangeEvent

func (*CKSyncEngineAccountChangeEvent) ChangeType

The iCloud account's change type.

func (*CKSyncEngineAccountChangeEvent) CurrentUser

func (o *CKSyncEngineAccountChangeEvent) CurrentUser() *CKRecordID

The current iCloud account's record identifier. If the user just signed in or switched accounts, this is the new user record ID. If the user signed out, this is `nil`.

func (*CKSyncEngineAccountChangeEvent) PreviousUser

func (o *CKSyncEngineAccountChangeEvent) PreviousUser() *CKRecordID

The previous iCloud account's record identifier. If the user just signed in, this is `nil`. If the user signed out or switched accounts, this is the old account's user record ID.

type CKSyncEngineAccountChangeType

type CKSyncEngineAccountChangeType int64

Describes a change to the device’s iCloud account.

const (
	// A change indicating a sign-in to an iCloud account.
	CKSyncEngineAccountChangeTypeSignIn CKSyncEngineAccountChangeType = 0
	// A change indicating a sign-out of an iCloud account.
	CKSyncEngineAccountChangeTypeSignOut CKSyncEngineAccountChangeType = 1
	// A change indicating a switch between two iCloud accounts.
	CKSyncEngineAccountChangeTypeSwitchAccounts CKSyncEngineAccountChangeType = 2
)

func (CKSyncEngineAccountChangeType) String

type CKSyncEngineConfiguration

type CKSyncEngineConfiguration struct {
	foundation.NSObject
}

A type that configures the attributes and behavior of a sync engine.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncengineconfiguration

func CKSyncEngineConfigurationFromID

func CKSyncEngineConfigurationFromID(id objc.ID) *CKSyncEngineConfiguration

func (*CKSyncEngineConfiguration) AutomaticallySync

func (o *CKSyncEngineConfiguration) AutomaticallySync() bool

A Boolean value that determines whether the engine syncs automatically. By default, the sync engine uses the system scheduler to automatically schedule both send and fetch operations. If an operation fails due to a recoverable error, such as a network failure, or when the server is enforcing request limits, the engine reschedules those operations as necessary. Unless you have a specific need, prefer to use the default behavior in your app. If you set this property's value to <doc://com.apple.documentation/documentation/swift/false>, use “CKSyncEngine/fetchChangesWithCompletionHandler:“ and “CKSyncEngine/sendChangesWithCompletionHandler:“ to invoke immediate sync operations, allowing for more control over when your app syncs its records. For example, you may want to sync at a specific time of day, or deterministically simulate certain conditions in your unit tests. The default value is <doc://com.apple.documentation/documentation/swift/true>.

func (*CKSyncEngineConfiguration) Database

func (o *CKSyncEngineConfiguration) Database() *CKDatabase

The associated database. Multiple sync engines can run in the same process, each targeting a different database. For example, you may use one sync engine for a person's private database and another for their shared database. - Important: When using CloudKit's production environment, don't create multiple sync engines that target the same database. You can, however, do this in the development environment to help testing — for example, to simulate multiple devices syncing back, and forth.

func (*CKSyncEngineConfiguration) Delegate

The object that provides the records to sync and handles any related events.

func (*CKSyncEngineConfiguration) InitWithDatabaseStateSerializationDelegate

func (o *CKSyncEngineConfiguration) InitWithDatabaseStateSerializationDelegate(database *CKDatabase, stateSerialization *CKSyncEngineStateSerialization, delegate CKSyncEngineDelegate) *CKSyncEngineConfiguration

Creates a configuration for the specified database and serialized state.

func (*CKSyncEngineConfiguration) SetAutomaticallySync

func (o *CKSyncEngineConfiguration) SetAutomaticallySync(automaticallySync bool)

func (*CKSyncEngineConfiguration) SetDatabase

func (o *CKSyncEngineConfiguration) SetDatabase(database *CKDatabase)

func (*CKSyncEngineConfiguration) SetDelegate

func (o *CKSyncEngineConfiguration) SetDelegate(delegate CKSyncEngineDelegate)

func (*CKSyncEngineConfiguration) SetStateSerialization

func (o *CKSyncEngineConfiguration) SetStateSerialization(stateSerialization *CKSyncEngineStateSerialization)

func (*CKSyncEngineConfiguration) SetSubscriptionID

func (o *CKSyncEngineConfiguration) SetSubscriptionID(subscriptionID *foundation.NSString)

func (*CKSyncEngineConfiguration) StateSerialization

The sync engine's serialized state. This property returns the value you specify for the initializer's `stateSerialization` parameter. If you choose to set this property after initialization, assign the state from the most recent “CKSyncEngineStateUpdateEvent“ handled by your delegate. However, If this is the first initialization of the associated sync engine, specify `nil` instead. The default value is `nil`.

func (*CKSyncEngineConfiguration) SubscriptionID

func (o *CKSyncEngineConfiguration) SubscriptionID() *foundation.NSString

The subscription identifier for the associated database. By default, a sync engine attempts to discover an existing subscription for the synced database. If one isn't found, the engine creates an internal “CKDatabaseSubscription“ and uses that to receive notifications about remote record changes. If you require the sync engine to use a specific database subscription, assign that subscription's identifier to this property. Doing so enables your app to be backwards compatible if you're migrating to “CKSyncEngine-4b4w9“ from a custom CloudKit sync implementation. The default value is `nil`.

type CKSyncEngineDelegate

type CKSyncEngineDelegate interface {
}

CKSyncEngineDelegate wraps the ObjC protocol CKSyncEngineDelegate.

type CKSyncEngineDidFetchChangesEvent

type CKSyncEngineDidFetchChangesEvent struct {
	CKSyncEngineEvent
}

The sync engine finished fetching changes from the server.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginedidfetchchangesevent

func CKSyncEngineDidFetchChangesEventFromID

func CKSyncEngineDidFetchChangesEventFromID(id objc.ID) *CKSyncEngineDidFetchChangesEvent

func (*CKSyncEngineDidFetchChangesEvent) Context

type CKSyncEngineDidFetchRecordZoneChangesEvent

type CKSyncEngineDidFetchRecordZoneChangesEvent struct {
	CKSyncEngineEvent
}

An object that provides information about a finished record zone fetch.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginedidfetchrecordzonechangesevent

func CKSyncEngineDidFetchRecordZoneChangesEventFromID

func CKSyncEngineDidFetchRecordZoneChangesEventFromID(id objc.ID) *CKSyncEngineDidFetchRecordZoneChangesEvent

func (*CKSyncEngineDidFetchRecordZoneChangesEvent) Error

An error that describes the cause of a failed fetch operation. A `nil` value indicates a successful fetch.

func (*CKSyncEngineDidFetchRecordZoneChangesEvent) ZoneID

The associated record zone's unique identifier.

type CKSyncEngineDidSendChangesEvent

type CKSyncEngineDidSendChangesEvent struct {
	CKSyncEngineEvent
}

An object that provides information about a finished send operation.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginedidsendchangesevent

func CKSyncEngineDidSendChangesEventFromID

func CKSyncEngineDidSendChangesEventFromID(id objc.ID) *CKSyncEngineDidSendChangesEvent

func (*CKSyncEngineDidSendChangesEvent) Context

type CKSyncEngineEvent

type CKSyncEngineEvent struct {
	foundation.NSObject
}

An event that occurs during a sync operation.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncengineevent

func CKSyncEngineEventFromID

func CKSyncEngineEventFromID(id objc.ID) *CKSyncEngineEvent

func (*CKSyncEngineEvent) AccountChangeEvent

func (o *CKSyncEngineEvent) AccountChangeEvent() *CKSyncEngineAccountChangeEvent

The event downcast to the subclass that represents a change to the device's iCloud account.

func (*CKSyncEngineEvent) DidFetchChangesEvent

func (o *CKSyncEngineEvent) DidFetchChangesEvent() *CKSyncEngineDidFetchChangesEvent

The event downcast to the subclass that represents a completed database fetch.

func (*CKSyncEngineEvent) DidFetchRecordZoneChangesEvent

func (o *CKSyncEngineEvent) DidFetchRecordZoneChangesEvent() *CKSyncEngineDidFetchRecordZoneChangesEvent

The event downcast to the subclass that represents a completed record zone fetch.

func (*CKSyncEngineEvent) DidSendChangesEvent

func (o *CKSyncEngineEvent) DidSendChangesEvent() *CKSyncEngineDidSendChangesEvent

The event downcast to the subclass that represents a completed send operation.

func (*CKSyncEngineEvent) FetchedDatabaseChangesEvent

func (o *CKSyncEngineEvent) FetchedDatabaseChangesEvent() *CKSyncEngineFetchedDatabaseChangesEvent

The event downcast to the subclass that represents a set of fetched database changes to process.

func (*CKSyncEngineEvent) FetchedRecordZoneChangesEvent

func (o *CKSyncEngineEvent) FetchedRecordZoneChangesEvent() *CKSyncEngineFetchedRecordZoneChangesEvent

The event downcast to the subclass that represents a set of fetched record zone changes to process.

func (*CKSyncEngineEvent) SentDatabaseChangesEvent

func (o *CKSyncEngineEvent) SentDatabaseChangesEvent() *CKSyncEngineSentDatabaseChangesEvent

The event downcast to the subclass that represents a sent batch of database changes.

func (*CKSyncEngineEvent) SentRecordZoneChangesEvent

func (o *CKSyncEngineEvent) SentRecordZoneChangesEvent() *CKSyncEngineSentRecordZoneChangesEvent

The event downcast to the subclass that represents a sent batch of record zone changes.

func (*CKSyncEngineEvent) StateUpdateEvent

func (o *CKSyncEngineEvent) StateUpdateEvent() *CKSyncEngineStateUpdateEvent

The event downcast to the subclass that represents an update to the sync engine's state.

func (*CKSyncEngineEvent) Type

The type of event.

func (*CKSyncEngineEvent) WillFetchChangesEvent

func (o *CKSyncEngineEvent) WillFetchChangesEvent() *CKSyncEngineWillFetchChangesEvent

The event downcast to the subclass that represents an imminent database fetch.

func (*CKSyncEngineEvent) WillFetchRecordZoneChangesEvent

func (o *CKSyncEngineEvent) WillFetchRecordZoneChangesEvent() *CKSyncEngineWillFetchRecordZoneChangesEvent

The event downcast to the subclass that represents an imminent fetch of record zone changes.

func (*CKSyncEngineEvent) WillSendChangesEvent

func (o *CKSyncEngineEvent) WillSendChangesEvent() *CKSyncEngineWillSendChangesEvent

The event downcast to the subclass that represents an imminent send operation.

type CKSyncEngineEventType

type CKSyncEngineEventType int64

Describes an event that occurs during a sync operation.

const (
	// The sync engine updated its state.
	CKSyncEngineEventTypeStateUpdate CKSyncEngineEventType = 0
	// The user signed in or out of their account.
	CKSyncEngineEventTypeAccountChange CKSyncEngineEventType = 1
	// The sync engine has fetched new database changes from the server.
	CKSyncEngineEventTypeFetchedDatabaseChanges CKSyncEngineEventType = 2
	// The sync engine fetched new record zone changes from the server.
	CKSyncEngineEventTypeFetchedRecordZoneChanges CKSyncEngineEventType = 3
	// The sync engine sent a batch of database changes to the server.
	CKSyncEngineEventTypeSentDatabaseChanges CKSyncEngineEventType = 4
	// The sync engine sent a batch of record zone changes to the server.
	CKSyncEngineEventTypeSentRecordZoneChanges CKSyncEngineEventType = 5
	// The sync engine is about to fetch changes from the server.
	CKSyncEngineEventTypeWillFetchChanges CKSyncEngineEventType = 6
	// The sync engine is about to fetch record zone changes from the server for a specific zone.
	CKSyncEngineEventTypeWillFetchRecordZoneChanges CKSyncEngineEventType = 7
	// The sync engine has completed fetching record zone changes from the server for a specific zone.
	CKSyncEngineEventTypeDidFetchRecordZoneChanges CKSyncEngineEventType = 8
	// The sync engine finished fetching changes from the server.
	CKSyncEngineEventTypeDidFetchChanges CKSyncEngineEventType = 9
	// The sync engine is about to send changes to the server.
	CKSyncEngineEventTypeWillSendChanges CKSyncEngineEventType = 10
	// The sync engine finished sending changes to the server.
	CKSyncEngineEventTypeDidSendChanges CKSyncEngineEventType = 11
)

func (CKSyncEngineEventType) String

func (e CKSyncEngineEventType) String() string

type CKSyncEngineFailedRecordSave

type CKSyncEngineFailedRecordSave struct {
	foundation.NSObject
}

A type that describes an unsuccessful attempt to modify an individual record.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginefailedrecordsave

func CKSyncEngineFailedRecordSaveFromID

func CKSyncEngineFailedRecordSaveFromID(id objc.ID) *CKSyncEngineFailedRecordSave

func (*CKSyncEngineFailedRecordSave) Error

A error that describes the reason for the unsuccessful attempt to modify the associated record.

func (*CKSyncEngineFailedRecordSave) Record

The record that CloudKit is unable to modify.

type CKSyncEngineFailedZoneSave

type CKSyncEngineFailedZoneSave struct {
	foundation.NSObject
}

An object that describes an unsuccessful attempt to modify a single record zone.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginefailedzonesave

func CKSyncEngineFailedZoneSaveFromID

func CKSyncEngineFailedZoneSaveFromID(id objc.ID) *CKSyncEngineFailedZoneSave

func (*CKSyncEngineFailedZoneSave) Error

A error that describes the reason for the unsuccessful attempt to modify the associated record zone.

func (*CKSyncEngineFailedZoneSave) RecordZone

func (o *CKSyncEngineFailedZoneSave) RecordZone() *CKRecordZone

The record zone that CloudKit is unable to modify.

type CKSyncEngineFetchChangesContext

type CKSyncEngineFetchChangesContext struct {
	foundation.NSObject
}

The context of an attempt to fetch changes from the server.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginefetchchangescontext

func CKSyncEngineFetchChangesContextFromID

func CKSyncEngineFetchChangesContextFromID(id objc.ID) *CKSyncEngineFetchChangesContext

func (*CKSyncEngineFetchChangesContext) Options

The options being used for this attempt to fetch changes.

func (*CKSyncEngineFetchChangesContext) Reason

The reason why the sync engine is attempting to fetch changes.

type CKSyncEngineFetchChangesOptions

type CKSyncEngineFetchChangesOptions struct {
	foundation.NSObject
}

A set of options to use with a fetch operation.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginefetchchangesoptions

func CKSyncEngineFetchChangesOptionsFromID

func CKSyncEngineFetchChangesOptionsFromID(id objc.ID) *CKSyncEngineFetchChangesOptions

func (*CKSyncEngineFetchChangesOptions) InitWithScope

Initializes a set of options with the specific scope.

func (*CKSyncEngineFetchChangesOptions) OperationGroup

The operation group to use for the underlying CloudKit operations. - Tip: Providing a specific operation group helps you to identify and analyze the telemetry of fetch operations in CloudKit Console. The default value is `nil`.

func (*CKSyncEngineFetchChangesOptions) PrioritizedZoneIDs

A list of zones that are prioritized over others while fetching changes. `CKSyncEngine` fetches changes for the zones in this list first. You might use this to prioritize a specific set of zones for initial sync. You could also prioritize the object currently showing in the UI by putting it first in this list. Any zones not included in this list are prioritized in a default manner. If a zone in this list has no changes to fetch, then that zone is ignored.

func (*CKSyncEngineFetchChangesOptions) Scope

The scope in which to fetch changes from the server.

func (*CKSyncEngineFetchChangesOptions) SetOperationGroup

func (o *CKSyncEngineFetchChangesOptions) SetOperationGroup(operationGroup *CKOperationGroup)

func (*CKSyncEngineFetchChangesOptions) SetPrioritizedZoneIDs

func (o *CKSyncEngineFetchChangesOptions) SetPrioritizedZoneIDs(prioritizedZoneIDs *foundation.NSArray[*CKRecordZoneID])

func (*CKSyncEngineFetchChangesOptions) SetScope

type CKSyncEngineFetchChangesScope

type CKSyncEngineFetchChangesScope struct {
	foundation.NSObject
}

A scope in which the sync engine will fetch changes from the server.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginefetchchangesscope

func CKSyncEngineFetchChangesScopeFromID

func CKSyncEngineFetchChangesScopeFromID(id objc.ID) *CKSyncEngineFetchChangesScope

func (*CKSyncEngineFetchChangesScope) ContainsZoneID

func (o *CKSyncEngineFetchChangesScope) ContainsZoneID(zoneID *CKRecordZoneID) bool

Returns true if the specified zone ID is included in this scope.

func (*CKSyncEngineFetchChangesScope) ExcludedZoneIDs

A specific set of zone IDs to exclude from this scope. If you know that you don't want to fetch changes for a particular set of zones, you can set those zones here.

func (*CKSyncEngineFetchChangesScope) InitWithExcludedZoneIDs

Creates a scope that includes all zones except the specified excluded zones.

func (*CKSyncEngineFetchChangesScope) InitWithZoneIDs

Creates a scope that includes only the specified set of zones.

func (*CKSyncEngineFetchChangesScope) ZoneIDs

A specific set of zone IDs to include in the scope. For example, if you want to fetch changes for a specific set of zones, you can specify them here. If `nil`, this scope includes all zones except those in `excludedZoneIDs`.

type CKSyncEngineFetchedDatabaseChangesEvent

type CKSyncEngineFetchedDatabaseChangesEvent struct {
	CKSyncEngineEvent
}

An object that provides information about fetched database changes.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginefetcheddatabasechangesevent

func CKSyncEngineFetchedDatabaseChangesEventFromID

func CKSyncEngineFetchedDatabaseChangesEventFromID(id objc.ID) *CKSyncEngineFetchedDatabaseChangesEvent

func (*CKSyncEngineFetchedDatabaseChangesEvent) Deletions

The fetched record zone deletions.

func (*CKSyncEngineFetchedDatabaseChangesEvent) Modifications

The fetched record zone modifications.

type CKSyncEngineFetchedRecordDeletion

type CKSyncEngineFetchedRecordDeletion struct {
	foundation.NSObject
}

An object that describes the deletion of an individual record.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginefetchedrecorddeletion

func CKSyncEngineFetchedRecordDeletionFromID

func CKSyncEngineFetchedRecordDeletionFromID(id objc.ID) *CKSyncEngineFetchedRecordDeletion

func (*CKSyncEngineFetchedRecordDeletion) RecordID

The deleted record's unique identifier.

func (*CKSyncEngineFetchedRecordDeletion) RecordType

The record type of the deleted record.

type CKSyncEngineFetchedRecordZoneChangesEvent

type CKSyncEngineFetchedRecordZoneChangesEvent struct {
	CKSyncEngineEvent
}

An object that provides information about fetched record zone changes.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginefetchedrecordzonechangesevent

func CKSyncEngineFetchedRecordZoneChangesEventFromID

func CKSyncEngineFetchedRecordZoneChangesEventFromID(id objc.ID) *CKSyncEngineFetchedRecordZoneChangesEvent

func (*CKSyncEngineFetchedRecordZoneChangesEvent) Deletions

The fetched record deletions.

func (*CKSyncEngineFetchedRecordZoneChangesEvent) Modifications

The fetched record modifications.

type CKSyncEngineFetchedZoneDeletion

type CKSyncEngineFetchedZoneDeletion struct {
	foundation.NSObject
}

An object that describes the deletion of a record zone.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginefetchedzonedeletion

func CKSyncEngineFetchedZoneDeletionFromID

func CKSyncEngineFetchedZoneDeletionFromID(id objc.ID) *CKSyncEngineFetchedZoneDeletion

func (*CKSyncEngineFetchedZoneDeletion) Reason

The reason for the deletion.

func (*CKSyncEngineFetchedZoneDeletion) ZoneID

The identifier of the deleted record zone.

type CKSyncEnginePendingDatabaseChange

type CKSyncEnginePendingDatabaseChange struct {
	foundation.NSObject
}

An object that describes an unsent database modification.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginependingdatabasechange

func CKSyncEnginePendingDatabaseChangeFromID

func CKSyncEnginePendingDatabaseChangeFromID(id objc.ID) *CKSyncEnginePendingDatabaseChange

func (*CKSyncEnginePendingDatabaseChange) Type

The type of database change.

func (*CKSyncEnginePendingDatabaseChange) ZoneID

The identifier of the record zone to change.

type CKSyncEnginePendingDatabaseChangeType

type CKSyncEnginePendingDatabaseChangeType int64

Describes the type of a pending database change.

const (
	CKSyncEnginePendingDatabaseChangeTypeSaveZone   CKSyncEnginePendingDatabaseChangeType = 0
	CKSyncEnginePendingDatabaseChangeTypeDeleteZone CKSyncEnginePendingDatabaseChangeType = 1
)

func (CKSyncEnginePendingDatabaseChangeType) String

type CKSyncEnginePendingRecordZoneChange

type CKSyncEnginePendingRecordZoneChange struct {
	foundation.NSObject
}

An object that describes an unsent record modification.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginependingrecordzonechange

func CKSyncEnginePendingRecordZoneChangeFromID

func CKSyncEnginePendingRecordZoneChangeFromID(id objc.ID) *CKSyncEnginePendingRecordZoneChange

func (*CKSyncEnginePendingRecordZoneChange) InitWithRecordIDType

Creates a record zone change of the specified type for the given record.

func (*CKSyncEnginePendingRecordZoneChange) RecordID

The identifier of the modified record.

func (*CKSyncEnginePendingRecordZoneChange) Type

The type of change to make.

type CKSyncEnginePendingRecordZoneChangeType

type CKSyncEnginePendingRecordZoneChangeType int64

A type of change in a record zone that needs to be sent to the server.

const (
	CKSyncEnginePendingRecordZoneChangeTypeSaveRecord   CKSyncEnginePendingRecordZoneChangeType = 0
	CKSyncEnginePendingRecordZoneChangeTypeDeleteRecord CKSyncEnginePendingRecordZoneChangeType = 1
)

func (CKSyncEnginePendingRecordZoneChangeType) String

type CKSyncEnginePendingZoneDelete

type CKSyncEnginePendingZoneDelete struct {
	CKSyncEnginePendingDatabaseChange
}

An object that describes an unsent record zone deletion.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginependingzonedelete

func CKSyncEnginePendingZoneDeleteFromID

func CKSyncEnginePendingZoneDeleteFromID(id objc.ID) *CKSyncEnginePendingZoneDelete

func (*CKSyncEnginePendingZoneDelete) InitWithZoneID

Creates a pending zone delete for the specified record zone identifier.

type CKSyncEnginePendingZoneSave

type CKSyncEnginePendingZoneSave struct {
	CKSyncEnginePendingDatabaseChange
}

An object that describes an unsent record zone modification.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginependingzonesave

func CKSyncEnginePendingZoneSaveFromID

func CKSyncEnginePendingZoneSaveFromID(id objc.ID) *CKSyncEnginePendingZoneSave

func (*CKSyncEnginePendingZoneSave) InitWithZone

Creates a pending zone save for the specified record zone.

func (*CKSyncEnginePendingZoneSave) Zone

type CKSyncEngineRecordZoneChangeBatch

type CKSyncEngineRecordZoneChangeBatch struct {
	foundation.NSObject
}

An object that contains the record changes for a single send operation.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginerecordzonechangebatch

func CKSyncEngineRecordZoneChangeBatchFromID

func CKSyncEngineRecordZoneChangeBatchFromID(id objc.ID) *CKSyncEngineRecordZoneChangeBatch

func (*CKSyncEngineRecordZoneChangeBatch) AtomicByZone

func (o *CKSyncEngineRecordZoneChangeBatch) AtomicByZone() bool

A Boolean value that determines whether CloudKit modifies records atomically by record zone. When <doc://com.apple.documentation/documentation/swift/true>, CloudKit processes record changes atomically by record zone, and if any individual change fails, all other changes in that record's record zone fail and return an error of type “CKError/Code/batchRequestFailed“. The default value is <doc://com.apple.documentation/documentation/swift/false>.

func (*CKSyncEngineRecordZoneChangeBatch) InitWithPendingChangesRecordProvider

func (o *CKSyncEngineRecordZoneChangeBatch) InitWithPendingChangesRecordProvider(pendingChanges *foundation.NSArray[*CKSyncEnginePendingRecordZoneChange], recordProvider objc.Block) *CKSyncEngineRecordZoneChangeBatch

Creates a batch of records to modify using the provided record zone changes.

func (*CKSyncEngineRecordZoneChangeBatch) InitWithRecordsToSaveRecordIDsToDeleteAtomicByZone

func (o *CKSyncEngineRecordZoneChangeBatch) InitWithRecordsToSaveRecordIDsToDeleteAtomicByZone(recordsToSave *foundation.NSArray[*CKRecord], recordIDsToDelete *foundation.NSArray[*CKRecordID], atomicByZone bool) *CKSyncEngineRecordZoneChangeBatch

Creates a batch of records to modify.

func (*CKSyncEngineRecordZoneChangeBatch) RecordIDsToDelete

The unique identifiers of the records to delete.

func (*CKSyncEngineRecordZoneChangeBatch) RecordsToSave

The records to save.

func (*CKSyncEngineRecordZoneChangeBatch) SetAtomicByZone

func (o *CKSyncEngineRecordZoneChangeBatch) SetAtomicByZone(atomicByZone bool)

type CKSyncEngineSendChangesContext

type CKSyncEngineSendChangesContext struct {
	foundation.NSObject
}

The context of an attempt to send changes to the server.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginesendchangescontext

func CKSyncEngineSendChangesContextFromID

func CKSyncEngineSendChangesContextFromID(id objc.ID) *CKSyncEngineSendChangesContext

func (*CKSyncEngineSendChangesContext) Options

The additional options for the send operation.

func (*CKSyncEngineSendChangesContext) Reason

The reason for the send operation.

type CKSyncEngineSendChangesOptions

type CKSyncEngineSendChangesOptions struct {
	foundation.NSObject
}

A set of options to use with a send operation.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginesendchangesoptions

func CKSyncEngineSendChangesOptionsFromID

func CKSyncEngineSendChangesOptionsFromID(id objc.ID) *CKSyncEngineSendChangesOptions

func (*CKSyncEngineSendChangesOptions) InitWithScope

Initializes a set of options with the specific scope.

func (*CKSyncEngineSendChangesOptions) OperationGroup

func (o *CKSyncEngineSendChangesOptions) OperationGroup() *CKOperationGroup

The operation group to use for the underlying CloudKit operations. - Tip: Providing a specific operation group helps you to identify and analyze the telemetry of send operations in CloudKit Console. The default value is `nil`.

func (*CKSyncEngineSendChangesOptions) Scope

The scope in which to send changes to the server.

func (*CKSyncEngineSendChangesOptions) SetOperationGroup

func (o *CKSyncEngineSendChangesOptions) SetOperationGroup(operationGroup *CKOperationGroup)

func (*CKSyncEngineSendChangesOptions) SetScope

type CKSyncEngineSendChangesScope

type CKSyncEngineSendChangesScope struct {
	foundation.NSObject
}

A scope in which the sync engine will send changes to the server.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginesendchangesscope

func CKSyncEngineSendChangesScopeFromID

func CKSyncEngineSendChangesScopeFromID(id objc.ID) *CKSyncEngineSendChangesScope

func (*CKSyncEngineSendChangesScope) ContainsPendingRecordZoneChange

func (o *CKSyncEngineSendChangesScope) ContainsPendingRecordZoneChange(pendingRecordZoneChange *CKSyncEnginePendingRecordZoneChange) bool

Returns true if this scope includes the given pending change.

func (*CKSyncEngineSendChangesScope) ContainsRecordID

func (o *CKSyncEngineSendChangesScope) ContainsRecordID(recordID *CKRecordID) bool

Returns true if this scope includes the given record ID.

func (*CKSyncEngineSendChangesScope) ExcludedZoneIDs

A specific set of zone IDs to exclude from this scope. If you know that you don't want to send changes for a particular set of zones, you can set those zones here. - Note: a scope with a non-nil “zoneIDs“ always has an empty `excludedZoneIDs`.

func (*CKSyncEngineSendChangesScope) InitWithExcludedZoneIDs

func (o *CKSyncEngineSendChangesScope) InitWithExcludedZoneIDs(excludedZoneIDs *foundation.NSSet[*CKRecordZoneID]) *CKSyncEngineSendChangesScope

Creates a scope that contains all zones except for the given zone IDs.

func (*CKSyncEngineSendChangesScope) InitWithRecordIDs

Creates a scope that includes only the given record IDs. If recordIDs is nil, this scope contains all records.

func (*CKSyncEngineSendChangesScope) InitWithZoneIDs

Creates a scope that contains only the given zone IDs. If zoneIDs is nil, then this scope contains all zones.

func (*CKSyncEngineSendChangesScope) RecordIDs

The scope of record IDs in which to send changes. If you only want to send changes for a particular set of records, you can initialize your scope with those records IDs. When creating the next batch of changes to send to the server, consult this property, and only send changes for these record IDs. If this and “zoneIDs“ are `nil`, then you should send all changes.

func (*CKSyncEngineSendChangesScope) ZoneIDs

The scope of zone IDs in which to send changes. If you only want to send changes for a particular set of zones, you can initialize your scope with those zone IDs. When creating the next batch of changes to send to the server, consult this, and only send changes within these zones. If this and “recordIDs“ are `nil`, then you should send all changes.

type CKSyncEngineSentDatabaseChangesEvent

type CKSyncEngineSentDatabaseChangesEvent struct {
	CKSyncEngineEvent
}

An object that provides information about a sent batch of database changes.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginesentdatabasechangesevent

func CKSyncEngineSentDatabaseChangesEventFromID

func CKSyncEngineSentDatabaseChangesEventFromID(id objc.ID) *CKSyncEngineSentDatabaseChangesEvent

func (*CKSyncEngineSentDatabaseChangesEvent) DeletedZoneIDs

The unique identifiers of the deleted record zones.

func (*CKSyncEngineSentDatabaseChangesEvent) FailedZoneDeletes

The unique identifiers of the record zones CloudKit is unable to delete, and the reasons why.

func (*CKSyncEngineSentDatabaseChangesEvent) FailedZoneSaves

The record zones that CloudKit is unable to modify.

func (*CKSyncEngineSentDatabaseChangesEvent) SavedZones

The modified record zones.

type CKSyncEngineSentRecordZoneChangesEvent

type CKSyncEngineSentRecordZoneChangesEvent struct {
	CKSyncEngineEvent
}

The sync engine finished sending a batch of record zone changes to the server.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginesentrecordzonechangesevent

func CKSyncEngineSentRecordZoneChangesEventFromID

func CKSyncEngineSentRecordZoneChangesEventFromID(id objc.ID) *CKSyncEngineSentRecordZoneChangesEvent

func (*CKSyncEngineSentRecordZoneChangesEvent) DeletedRecordIDs

The unique identifiers of the deleted records.

func (*CKSyncEngineSentRecordZoneChangesEvent) FailedRecordDeletes

The unique identifiers of the records CloudKit is unable to delete, and the reasons why.

func (*CKSyncEngineSentRecordZoneChangesEvent) FailedRecordSaves

The records that CloudKit is unable to modify.

func (*CKSyncEngineSentRecordZoneChangesEvent) SavedRecords

The modified records.

type CKSyncEngineState

type CKSyncEngineState struct {
	foundation.NSObject
}

An object that manages the sync engine’s state.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginestate

func CKSyncEngineStateFromID

func CKSyncEngineStateFromID(id objc.ID) *CKSyncEngineState

func (*CKSyncEngineState) AddPendingDatabaseChanges

func (o *CKSyncEngineState) AddPendingDatabaseChanges(changes *foundation.NSArray[*CKSyncEnginePendingDatabaseChange])

Adds the specified database changes to the state.

func (*CKSyncEngineState) AddPendingRecordZoneChanges

func (o *CKSyncEngineState) AddPendingRecordZoneChanges(changes *foundation.NSArray[*CKSyncEnginePendingRecordZoneChange])

Adds the specified record zone changes to the state.

func (*CKSyncEngineState) HasPendingUntrackedChanges

func (o *CKSyncEngineState) HasPendingUntrackedChanges() bool

A Boolean value that indicates whether there are pending changes that the sync engine is unaware of. Use this property to inform the sync engine that there are pending changes other than those available in “CKSyncEngineState/pendingRecordZoneChanges“. After you set this property, the sync engine automatically schedules a send operation and, when that operation executes, asks your delegate to provide those changes by invoking the “CKSyncEngineDelegate/syncEngine:nextRecordZoneChangeBatchForContext:“ method. Using this property is optional and is necessary only if you track pending changes manually, outside of the sync engine's state.

func (*CKSyncEngineState) PendingDatabaseChanges

A list of database changes that the sync engine has yet to send to the iCloud servers. This array contains any pending database changes to send to the iCloud servers. After the sync engine sends those changes, your app's sync delegate receives an event of type “CKSyncEngineSentDatabaseChangesEvent“. The sync engine keeps this list up-to-date while sending changes to the server. For example, when it successfully saves a zone, it will remove that change from this list. If it fails to send a change due to some retryable error (e.g. a network failure), it will keep that change in this list. Use the “CKSyncEngineState/addPendingDatabaseChanges:“ and “CKSyncEngineState/removePendingDatabaseChanges:“ methods to modify the array's contents.

func (*CKSyncEngineState) PendingRecordZoneChanges

A list of record zone changes that the sync engine has yet to send to the iCloud servers. This array contains any pending record zone changes to send to the iCloud servers. After the sync engine sends those changes, your app's sync delegate receives an event of type “CKSyncEngineSentRecordZoneChangesEvent“. The sync engine keeps this list up-to-date while sending changes to the server. For example, when it successfully saves a record, it removes that change from this list. If it fails to send a change due to some retryable error (e.g. a network failure), it keeps that change in this list. Use the “CKSyncEngineState/addPendingRecordZoneChanges:“ and “CKSyncEngineState/removePendingRecordZoneChanges:“ methods to modify the array's contents.

func (*CKSyncEngineState) RemovePendingDatabaseChanges

func (o *CKSyncEngineState) RemovePendingDatabaseChanges(changes *foundation.NSArray[*CKSyncEnginePendingDatabaseChange])

Removes the specified database changes from the state.

func (*CKSyncEngineState) RemovePendingRecordZoneChanges

func (o *CKSyncEngineState) RemovePendingRecordZoneChanges(changes *foundation.NSArray[*CKSyncEnginePendingRecordZoneChange])

Removes the specified record zone changes from the state.

func (*CKSyncEngineState) SetHasPendingUntrackedChanges

func (o *CKSyncEngineState) SetHasPendingUntrackedChanges(hasPendingUntrackedChanges bool)

func (*CKSyncEngineState) ZoneIDsWithUnfetchedServerChanges

func (o *CKSyncEngineState) ZoneIDsWithUnfetchedServerChanges() *foundation.NSArray[*CKRecordZoneID]

The identifiers of zones with changes on the server that have not yet been fetched. The sync engine populates this list automatically, for example when receiving a push notification indicating new changes.

type CKSyncEngineStateSerialization

type CKSyncEngineStateSerialization struct {
	foundation.NSObject
}

An opaque object that contains the serialized representation of a sync engine’s current state.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginestateserialization

func CKSyncEngineStateSerializationFromID

func CKSyncEngineStateSerializationFromID(id objc.ID) *CKSyncEngineStateSerialization

type CKSyncEngineStateUpdateEvent

type CKSyncEngineStateUpdateEvent struct {
	CKSyncEngineEvent
}

The sync engine state was updated, and you should persist it locally.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginestateupdateevent

func CKSyncEngineStateUpdateEventFromID

func CKSyncEngineStateUpdateEventFromID(id objc.ID) *CKSyncEngineStateUpdateEvent

func (*CKSyncEngineStateUpdateEvent) StateSerialization

type CKSyncEngineSyncReason

type CKSyncEngineSyncReason int64

Describes the reason for a sync operation.

const (
	// The sync engine automatically scheduled this sync.
	CKSyncEngineSyncReasonScheduled CKSyncEngineSyncReason = 0
	// A manual sync operation.
	CKSyncEngineSyncReasonManual CKSyncEngineSyncReason = 1
)

func (CKSyncEngineSyncReason) String

func (e CKSyncEngineSyncReason) String() string

type CKSyncEngineWillFetchChangesEvent

type CKSyncEngineWillFetchChangesEvent struct {
	CKSyncEngineEvent
}

The sync engine is about to fetch changes from the server.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginewillfetchchangesevent

func CKSyncEngineWillFetchChangesEventFromID

func CKSyncEngineWillFetchChangesEventFromID(id objc.ID) *CKSyncEngineWillFetchChangesEvent

func (*CKSyncEngineWillFetchChangesEvent) Context

type CKSyncEngineWillFetchRecordZoneChangesEvent

type CKSyncEngineWillFetchRecordZoneChangesEvent struct {
	CKSyncEngineEvent
}

The sync engine finished fetching record zone changes from the server for a specific zone.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginewillfetchrecordzonechangesevent

func CKSyncEngineWillFetchRecordZoneChangesEventFromID

func CKSyncEngineWillFetchRecordZoneChangesEventFromID(id objc.ID) *CKSyncEngineWillFetchRecordZoneChangesEvent

func (*CKSyncEngineWillFetchRecordZoneChangesEvent) ZoneID

type CKSyncEngineWillSendChangesEvent

type CKSyncEngineWillSendChangesEvent struct {
	CKSyncEngineEvent
}

An object that provides information about an imminent send of local changes.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksyncenginewillsendchangesevent

func CKSyncEngineWillSendChangesEventFromID

func CKSyncEngineWillSendChangesEventFromID(id objc.ID) *CKSyncEngineWillSendChangesEvent

func (*CKSyncEngineWillSendChangesEvent) Context

type CKSyncEngineZoneDeletionReason

type CKSyncEngineZoneDeletionReason int64

Describes the reason for a record zone deletion.

const (
	// Your app deleted the record zone.
	CKSyncEngineZoneDeletionReasonDeleted CKSyncEngineZoneDeletionReason = 0
	// The owner of the iCloud account purged your app’s data using the Settings app.
	CKSyncEngineZoneDeletionReasonPurged CKSyncEngineZoneDeletionReason = 1
	// The owner of the iCloud account reset their encrypted data.
	CKSyncEngineZoneDeletionReasonEncryptedDataReset CKSyncEngineZoneDeletionReason = 2
)

func (CKSyncEngineZoneDeletionReason) String

type CKSystemSharingUIObserver

type CKSystemSharingUIObserver struct {
	foundation.NSObject
}

An object the system uses to monitor changes in sharing.

Apple documentation: https://developer.apple.com/documentation/cloudkit/cksystemsharinguiobserver

func CKSystemSharingUIObserverFromID

func CKSystemSharingUIObserverFromID(id objc.ID) *CKSystemSharingUIObserver

func (*CKSystemSharingUIObserver) InitWithContainer

func (o *CKSystemSharingUIObserver) InitWithContainer(container *CKContainer) *CKSystemSharingUIObserver

Creates and initializes an observer using the provided container.

func (*CKSystemSharingUIObserver) SetSystemSharingUIDidSaveShareBlock

func (o *CKSystemSharingUIObserver) SetSystemSharingUIDidSaveShareBlock(systemSharingUIDidSaveShareBlock func(*CKRecordID, *CKShare, unsafe.Pointer))

func (*CKSystemSharingUIObserver) SetSystemSharingUIDidStopSharingBlock

func (o *CKSystemSharingUIObserver) SetSystemSharingUIDidStopSharingBlock(systemSharingUIDidStopSharingBlock func(*CKRecordID, unsafe.Pointer))

func (*CKSystemSharingUIObserver) SystemSharingUIDidSaveShareBlock

func (o *CKSystemSharingUIObserver) SystemSharingUIDidSaveShareBlock() objc.Block

A callback block the system invokes after the success or failure of a share save by the system sharing UI. Following a successful share save by the system sharing UI in the provided “CKContainer“, the system invokes this callback with a `nonnull` “CKRecord/ID“, a `nonnull` share, and a `nil` error. If a save failure occurs due to a per-item error like “CKError/Code/serverRecordChanged“, the system invokes this callback with a `nonnull` “CKRecord/ID“, a `nil` share, and a `nonnull` error. Each “CKSystemSharingUIObserver“ instance has a private serial queue. The system uses this queue for all callback block invocations.

func (*CKSystemSharingUIObserver) SystemSharingUIDidStopSharingBlock

func (o *CKSystemSharingUIObserver) SystemSharingUIDidStopSharingBlock() objc.Block

A callback block the system invokes after the success or failure of a share delete by the system sharing UI. The system invokes this block on the success or failure of a “CKShare“ delete when the user decides to stop sharing through the system sharing UI. Each “CKSystemSharingUIObserver“ instance has a private serial queue. The system uses this queue for all callback block invocations.

type CKUserIdentity

type CKUserIdentity struct {
	foundation.NSObject
}

The identity of a user.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckuseridentity

func CKUserIdentityFromID

func CKUserIdentityFromID(id objc.ID) *CKUserIdentity

func (*CKUserIdentity) ContactIdentifiers

func (o *CKUserIdentity) ContactIdentifiers() *foundation.NSArray[*foundation.NSString]

Identifiers that match contacts in the local Contacts database. Identities that CloudKit discovers using “CKDiscoverAllUserIdentitiesOperation“ correspond to entries in the local Contacts database, matching the identifier on <doc://com.apple.documentation/documentation/contacts/cncontact>. Use these identifiers with the Contacts database to get additional information about the contacts. Multiple identifiers can exist for a single discovered user because multiple contacts can contain the same email addresses or phone numbers. To transform these identifiers into an array of unified contact identifiers, create a predicate by calling the <doc://com.apple.documentation/documentation/contacts/cncontact/predicateforcontacts(withidentifiers:)> method, and then pass that predicate to the <doc://com.apple.documentation/documentation/contacts/cncontactstore/unifiedcontacts(matching:keystofetch:)> method. Deprecated: No longer supported. Please see Sharing CloudKit Data with Other iCloud Users.

func (*CKUserIdentity) HasiCloudAccount

func (o *CKUserIdentity) HasiCloudAccount() bool

A Boolean value that indicates whether the user has an iCloud account. `true` if the user identity has an iCloud account; otherwise, `false`.

func (*CKUserIdentity) LookupInfo

func (o *CKUserIdentity) LookupInfo() *CKUserIdentityLookupInfo

The lookup info for retrieving the user identity. Use this property's value to retrieve the user identity when using the “CKDiscoverUserIdentitiesOperation“ and “CKFetchShareParticipantsOperation“ operations.

func (*CKUserIdentity) NameComponents

func (o *CKUserIdentity) NameComponents() *foundation.NSPersonNameComponents

The user's name. You can use this property to construct the user's name for display. Use the components with an instance of <doc://com.apple.documentation/documentation/foundation/personnamecomponentsformatter> to create a string representation for the current locale.

func (*CKUserIdentity) UserRecordID

func (o *CKUserIdentity) UserRecordID() *CKRecordID

The user record ID for the corresponding user record.

type CKUserIdentityLookupInfo

type CKUserIdentityLookupInfo struct {
	foundation.NSObject
}

The criteria to use when searching for discoverable iCloud users.

Apple documentation: https://developer.apple.com/documentation/cloudkit/ckuseridentitylookupinfo

func CKUserIdentityLookupInfoFromID

func CKUserIdentityLookupInfoFromID(id objc.ID) *CKUserIdentityLookupInfo

func (*CKUserIdentityLookupInfo) EmailAddress

func (o *CKUserIdentityLookupInfo) EmailAddress() *foundation.NSString

The user's email address.

func (*CKUserIdentityLookupInfo) InitWithEmailAddress

func (o *CKUserIdentityLookupInfo) InitWithEmailAddress(emailAddress *foundation.NSString) *CKUserIdentityLookupInfo

Creates a lookup info for the specified email address. - Parameters: - emailAddress: The email address for looking up the user identity. After you create a lookup info, use the “CKDiscoverUserIdentitiesOperation“ operation or the “CKFetchShareParticipantsOperation“ operation to retrieve the corresponding user identity.

func (*CKUserIdentityLookupInfo) InitWithPhoneNumber

func (o *CKUserIdentityLookupInfo) InitWithPhoneNumber(phoneNumber *foundation.NSString) *CKUserIdentityLookupInfo

Creates a lookup info for the specified phone number. - Parameters: - phoneNumber: The phone number for looking up the user identity. After you create a lookup info, use the “CKDiscoverUserIdentitiesOperation“ operation or the “CKFetchShareParticipantsOperation“ operation to retrieve the corresponding user identity.

func (*CKUserIdentityLookupInfo) InitWithUserRecordID

func (o *CKUserIdentityLookupInfo) InitWithUserRecordID(userRecordID *CKRecordID) *CKUserIdentityLookupInfo

Creates a lookup info for the specified user record ID. - Parameters: - userRecordID: The user record ID for looking up the user identity. After you create a lookup info, use the “CKDiscoverUserIdentitiesOperation“ operation or the “CKFetchShareParticipantsOperation“ operation to retrieve the corresponding user identity.

func (*CKUserIdentityLookupInfo) PhoneNumber

func (o *CKUserIdentityLookupInfo) PhoneNumber() *foundation.NSString

The user's phone number.

func (*CKUserIdentityLookupInfo) UserRecordID

func (o *CKUserIdentityLookupInfo) UserRecordID() *CKRecordID

The ID of the user record. Use this value to retrieve the user record for the user identity. The user record doesn't contain any personal information about the user, by default. You can add data to the user record, but you shouldn't add anything sensitive.

type Clockid_t

type Clockid_t int64

func (Clockid_t) String

func (e Clockid_t) String() string

type Dispatch_autorelease_frequency_t

type Dispatch_autorelease_frequency_t uint64
const (
	DISPATCH_AUTORELEASE_FREQUENCY_INHERIT   Dispatch_autorelease_frequency_t = 0
	DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1
	DISPATCH_AUTORELEASE_FREQUENCY_NEVER     Dispatch_autorelease_frequency_t = 2
)

func (Dispatch_autorelease_frequency_t) String

type Dispatch_block_flags_t

type Dispatch_block_flags_t uint64
const (
	DISPATCH_BLOCK_BARRIER           Dispatch_block_flags_t = 1
	DISPATCH_BLOCK_DETACHED          Dispatch_block_flags_t = 2
	DISPATCH_BLOCK_ASSIGN_CURRENT    Dispatch_block_flags_t = 4
	DISPATCH_BLOCK_NO_QOS_CLASS      Dispatch_block_flags_t = 8
	DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16
	DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32
)

func (Dispatch_block_flags_t) String

func (e Dispatch_block_flags_t) String() string

type Filesec_property_t

type Filesec_property_t int64
const (
	FILESEC_OWNER         Filesec_property_t = 1
	FILESEC_GROUP         Filesec_property_t = 2
	FILESEC_UUID          Filesec_property_t = 3
	FILESEC_MODE          Filesec_property_t = 4
	FILESEC_ACL           Filesec_property_t = 5
	FILESEC_GRPUUID       Filesec_property_t = 6
	FILESEC_ACL_RAW       Filesec_property_t = 100
	FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101
)

func (Filesec_property_t) String

func (e Filesec_property_t) String() string

type Idtype_t

type Idtype_t int64
const (
	P_ALL  Idtype_t = 0
	P_PID  Idtype_t = 1
	P_PGID Idtype_t = 2
)

func (Idtype_t) String

func (e Idtype_t) String() string

type Ipc_info_object_type_t

type Ipc_info_object_type_t int64
const (
	IPC_OTYPE_NONE                 Ipc_info_object_type_t = 0
	IPC_OTYPE_THREAD_CONTROL       Ipc_info_object_type_t = 1
	IPC_OTYPE_TASK_CONTROL         Ipc_info_object_type_t = 2
	IPC_OTYPE_HOST                 Ipc_info_object_type_t = 3
	IPC_OTYPE_HOST_PRIV            Ipc_info_object_type_t = 4
	IPC_OTYPE_PROCESSOR            Ipc_info_object_type_t = 5
	IPC_OTYPE_PROCESSOR_SET        Ipc_info_object_type_t = 6
	IPC_OTYPE_PROCESSOR_SET_NAME   Ipc_info_object_type_t = 7
	IPC_OTYPE_TIMER                Ipc_info_object_type_t = 8
	IPC_OTYPE_PORT_SUBST_ONCE      Ipc_info_object_type_t = 9
	IPC_OTYPE_MIG                  Ipc_info_object_type_t = 10
	IPC_OTYPE_MEMORY_OBJECT        Ipc_info_object_type_t = 11
	IPC_OTYPE_XMM_PAGER            Ipc_info_object_type_t = 12
	IPC_OTYPE_XMM_KERNEL           Ipc_info_object_type_t = 13
	IPC_OTYPE_XMM_REPLY            Ipc_info_object_type_t = 14
	IPC_OTYPE_UND_REPLY            Ipc_info_object_type_t = 15
	IPC_OTYPE_HOST_NOTIFY          Ipc_info_object_type_t = 16
	IPC_OTYPE_HOST_SECURITY        Ipc_info_object_type_t = 17
	IPC_OTYPE_LEDGER               Ipc_info_object_type_t = 18
	IPC_OTYPE_MAIN_DEVICE          Ipc_info_object_type_t = 19
	IPC_OTYPE_TASK_NAME            Ipc_info_object_type_t = 20
	IPC_OTYPE_SUBSYSTEM            Ipc_info_object_type_t = 21
	IPC_OTYPE_IO_DONE_QUEUE        Ipc_info_object_type_t = 22
	IPC_OTYPE_SEMAPHORE            Ipc_info_object_type_t = 23
	IPC_OTYPE_LOCK_SET             Ipc_info_object_type_t = 24
	IPC_OTYPE_CLOCK                Ipc_info_object_type_t = 25
	IPC_OTYPE_CLOCK_CTRL           Ipc_info_object_type_t = 26
	IPC_OTYPE_IOKIT_IDENT          Ipc_info_object_type_t = 27
	IPC_OTYPE_NAMED_ENTRY          Ipc_info_object_type_t = 28
	IPC_OTYPE_IOKIT_CONNECT        Ipc_info_object_type_t = 29
	IPC_OTYPE_IOKIT_OBJECT         Ipc_info_object_type_t = 30
	IPC_OTYPE_UPL                  Ipc_info_object_type_t = 31
	IPC_OTYPE_MEM_OBJ_CONTROL      Ipc_info_object_type_t = 32
	IPC_OTYPE_AU_SESSIONPORT       Ipc_info_object_type_t = 33
	IPC_OTYPE_FILEPORT             Ipc_info_object_type_t = 34
	IPC_OTYPE_LABELH               Ipc_info_object_type_t = 35
	IPC_OTYPE_TASK_RESUME          Ipc_info_object_type_t = 36
	IPC_OTYPE_VOUCHER              Ipc_info_object_type_t = 37
	IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38
	IPC_OTYPE_WORK_INTERVAL        Ipc_info_object_type_t = 39
	IPC_OTYPE_UX_HANDLER           Ipc_info_object_type_t = 40
	IPC_OTYPE_UEXT_OBJECT          Ipc_info_object_type_t = 41
	IPC_OTYPE_ARCADE_REG           Ipc_info_object_type_t = 42
	IPC_OTYPE_EVENTLINK            Ipc_info_object_type_t = 43
	IPC_OTYPE_TASK_INSPECT         Ipc_info_object_type_t = 44
	IPC_OTYPE_TASK_READ            Ipc_info_object_type_t = 45
	IPC_OTYPE_THREAD_INSPECT       Ipc_info_object_type_t = 46
	IPC_OTYPE_THREAD_READ          Ipc_info_object_type_t = 47
	IPC_OTYPE_SUID_CRED            Ipc_info_object_type_t = 48
	IPC_OTYPE_HYPERVISOR           Ipc_info_object_type_t = 49
	IPC_OTYPE_TASK_ID_TOKEN        Ipc_info_object_type_t = 50
	IPC_OTYPE_TASK_FATAL           Ipc_info_object_type_t = 51
	IPC_OTYPE_KCDATA               Ipc_info_object_type_t = 52
	IPC_OTYPE_EXCLAVES_RESOURCE    Ipc_info_object_type_t = 53
	IPC_OTYPE_THREAD_RESUME        Ipc_info_object_type_t = 54
	IPC_OTYPE_UNKNOWN              Ipc_info_object_type_t = 4294967295
)

func (Ipc_info_object_type_t) String

func (e Ipc_info_object_type_t) String() string

type Launch_data_type_t

type Launch_data_type_t int64
const (
	LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1
	LAUNCH_DATA_ARRAY      Launch_data_type_t = 2
	LAUNCH_DATA_FD         Launch_data_type_t = 3
	LAUNCH_DATA_INTEGER    Launch_data_type_t = 4
	LAUNCH_DATA_REAL       Launch_data_type_t = 5
	LAUNCH_DATA_BOOL       Launch_data_type_t = 6
	LAUNCH_DATA_STRING     Launch_data_type_t = 7
	LAUNCH_DATA_OPAQUE     Launch_data_type_t = 8
	LAUNCH_DATA_ERRNO      Launch_data_type_t = 9
	LAUNCH_DATA_MACHPORT   Launch_data_type_t = 10
)

func (Launch_data_type_t) String

func (e Launch_data_type_t) String() string

type MDLabelDomain

type MDLabelDomain int64

@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

type MDQueryOptionFlags

type MDQueryOptionFlags int64
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int64

@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.

const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

type Mach_vm_range_flags_t

type Mach_vm_range_flags_t int64
const (
	MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)

func (Mach_vm_range_flags_t) String

func (e Mach_vm_range_flags_t) String() string

type Mach_vm_range_flavor_t

type Mach_vm_range_flavor_t int64
const (
	MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0
	MACH_VM_RANGE_FLAVOR_V1      Mach_vm_range_flavor_t = 1
)

func (Mach_vm_range_flavor_t) String

func (e Mach_vm_range_flavor_t) String() string

type Mach_vm_range_tag_t

type Mach_vm_range_tag_t int64
const (
	MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0
	MACH_VM_RANGE_DATA    Mach_vm_range_tag_t = 1
	MACH_VM_RANGE_FIXED   Mach_vm_range_tag_t = 2
)

func (Mach_vm_range_tag_t) String

func (e Mach_vm_range_tag_t) String() string

type Mpo_flags_t

type Mpo_flags_t int64
const (
	MPO_PORT                            Mpo_flags_t = 0
	MPO_SERVICE_PORT                    Mpo_flags_t = 1024
	MPO_CONNECTION_PORT                 Mpo_flags_t = 2048
	MPO_REPLY_PORT                      Mpo_flags_t = 4096
	MPO_WEAK_REPLY_PORT                 Mpo_flags_t = 16384
	MPO_NOTIFICATION_PORT               Mpo_flags_t = 17408
	MPO_EXCEPTION_PORT                  Mpo_flags_t = 32768
	MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536
)

func (Mpo_flags_t) String

func (e Mpo_flags_t) String() string

type Os_clockid_t

type Os_clockid_t int64
const (
	OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)

func (Os_clockid_t) String

func (e Os_clockid_t) String() string

type Ptrauth_key

type Ptrauth_key int64
const (
	Ptrauth_key_none                     Ptrauth_key = -1
	Ptrauth_key_asia                     Ptrauth_key = 0
	Ptrauth_key_asib                     Ptrauth_key = 1
	Ptrauth_key_asda                     Ptrauth_key = 2
	Ptrauth_key_asdb                     Ptrauth_key = 3
	Ptrauth_key_process_independent_code Ptrauth_key = 0
	Ptrauth_key_process_dependent_code   Ptrauth_key = 1
	Ptrauth_key_process_independent_data Ptrauth_key = 2
	Ptrauth_key_process_dependent_data   Ptrauth_key = 3
	Ptrauth_key_return_address           Ptrauth_key = 1
	Ptrauth_key_frame_pointer            Ptrauth_key = 3
	Ptrauth_key_function_pointer         Ptrauth_key = 0
	Ptrauth_key_block_function           Ptrauth_key = 0
	Ptrauth_key_cxx_vtable_pointer       Ptrauth_key = 2
	Ptrauth_key_method_list_pointer      Ptrauth_key = 2
	Ptrauth_key_objc_isa_pointer         Ptrauth_key = 2
	Ptrauth_key_objc_super_pointer       Ptrauth_key = 2
	Ptrauth_key_objc_sel_pointer         Ptrauth_key = 3
	Ptrauth_key_objc_class_ro_pointer    Ptrauth_key = 2
	Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2
	Ptrauth_key_init_fini_pointer        Ptrauth_key = 0
)

func (Ptrauth_key) String

func (e Ptrauth_key) String() string

type Qos_class_t

type Qos_class_t uint32
const (
	QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33
	QOS_CLASS_USER_INITIATED   Qos_class_t = 25
	QOS_CLASS_DEFAULT          Qos_class_t = 21
	QOS_CLASS_UTILITY          Qos_class_t = 17
	QOS_CLASS_BACKGROUND       Qos_class_t = 9
	QOS_CLASS_UNSPECIFIED      Qos_class_t = 0
)

func (Qos_class_t) String

func (e Qos_class_t) String() string

type Virtual_memory_guard_exception_code_t

type Virtual_memory_guard_exception_code_t int64
const (
	KGUARD_EXC_DEALLOC_GAP                   Virtual_memory_guard_exception_code_t = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        Virtual_memory_guard_exception_code_t = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         Virtual_memory_guard_exception_code_t = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    Virtual_memory_guard_exception_code_t = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    Virtual_memory_guard_exception_code_t = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         Virtual_memory_guard_exception_code_t = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         Virtual_memory_guard_exception_code_t = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  Virtual_memory_guard_exception_code_t = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    Virtual_memory_guard_exception_code_t = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              Virtual_memory_guard_exception_code_t = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        Virtual_memory_guard_exception_code_t = 99
	KGUARD_EXC_SEC_COPY_DENIED               Virtual_memory_guard_exception_code_t = 100
	KGUARD_EXC_SEC_SHARING_DENIED            Virtual_memory_guard_exception_code_t = 101
	KGUARD_EXC_MTE_SYNC_FAULT                Virtual_memory_guard_exception_code_t = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          Virtual_memory_guard_exception_code_t = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          Virtual_memory_guard_exception_code_t = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204
)

func (Virtual_memory_guard_exception_code_t) String

type Xpc_listener_create_flags_t

type Xpc_listener_create_flags_t int64
const (
	XPC_LISTENER_CREATE_NONE             Xpc_listener_create_flags_t = 0
	XPC_LISTENER_CREATE_INACTIVE         Xpc_listener_create_flags_t = 1
	XPC_LISTENER_CREATE_FORCE_MACH       Xpc_listener_create_flags_t = 2
	XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4
)

func (Xpc_listener_create_flags_t) String

type Xpc_session_create_flags_t

type Xpc_session_create_flags_t int64
const (
	XPC_SESSION_CREATE_NONE            Xpc_session_create_flags_t = 0
	XPC_SESSION_CREATE_INACTIVE        Xpc_session_create_flags_t = 1
	XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2
)

func (Xpc_session_create_flags_t) String

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL