One Logo Pool Ball
CloudKit · IOS API REFERENCE

CKModifySubscriptionsOperation

class · iOS 8.0+ · SDK 27.1

class CKModifySubscriptionsOperation

Members (14)

init · iOS 8.0+

init

TypeScript
static init(): CKModifySubscriptionsOperation
Swift declaration
init()
get · iOS 8.0+

subscriptionsToSave

TypeScript
get subscriptionsToSave(): (Array<CKSubscription>) | null
Swift declaration
var subscriptionsToSave: [CKSubscription]? { get set }
set · iOS 8.0+

subscriptionsToSave

TypeScript
set subscriptionsToSave(value: (Array<CKSubscription>) | null)
Swift declaration
var subscriptionsToSave: [CKSubscription]? { get set }
get · iOS 15.0+

modifySubscriptionsResultBlock

TypeScript
get modifySubscriptionsResultBlock(): (((arg0: SDKHandle) => Promise<void>)) | null
Swift declaration
var modifySubscriptionsResultBlock: ((Result<Void, any Error>) -> Void)? { get set }

The closure to execute after CloudKit modifies all of the subscriptions. The closure returns no value and takes the following parameter: - A <doc://com.apple.documentation/documentation/swift/result> that contains either: - A successful `Result`, or - An error that contains information about a problem encountered modifying the subscriptions. The closure executes only once, and represents your final opportunity to process the operation's results. The closure executes serially with respect to the other closures of the operation. Update the value of this property before you execute the operation or submit it to a queue.

set · iOS 15.0+

modifySubscriptionsResultBlock

TypeScript
set modifySubscriptionsResultBlock(value: (((arg0: SDKHandle) => void)) | null)
Swift declaration
var modifySubscriptionsResultBlock: ((Result<Void, any Error>) -> Void)? { get set }

The closure to execute after CloudKit modifies all of the subscriptions. The closure returns no value and takes the following parameter: - A <doc://com.apple.documentation/documentation/swift/result> that contains either: - A successful `Result`, or - An error that contains information about a problem encountered modifying the subscriptions. The closure executes only once, and represents your final opportunity to process the operation's results. The closure executes serially with respect to the other closures of the operation. Update the value of this property before you execute the operation or submit it to a queue.

get · iOS 8.0+ · Deprecated in iOS 15.0

modifySubscriptionsCompletionBlock

TypeScript
get modifySubscriptionsCompletionBlock(): (((arg0: (Array<CKSubscription>) | null, arg1: (Array<string>) | null, arg2: (NativeError) | null) => Promise<void>)) | null
Swift declaration
var modifySubscriptionsCompletionBlock: (([CKSubscription]?, [CKSubscription.ID]?, (any Error)?) -> Void)? { get set }

The closure to execute after the operation modifies the subscriptions. The closure returns no value and takes the following parameters: - The subscriptions to save. - The IDs of the subscriptions to delete. - An error that contains information about a problem, or `nil` if CloudKit successfully modifies the subscriptions. The operation executes this closure only once, and it's your only opportunity to process the results. 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 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.

set · iOS 8.0+ · Deprecated in iOS 15.0

modifySubscriptionsCompletionBlock

TypeScript
set modifySubscriptionsCompletionBlock(value: (((arg0: (Array<CKSubscription>) | null, arg1: (Array<string>) | null, arg2: (NativeError) | null) => void)) | null)
Swift declaration
var modifySubscriptionsCompletionBlock: (([CKSubscription]?, [CKSubscription.ID]?, (any Error)?) -> Void)? { get set }

The closure to execute after the operation modifies the subscriptions. The closure returns no value and takes the following parameters: - The subscriptions to save. - The IDs of the subscriptions to delete. - An error that contains information about a problem, or `nil` if CloudKit successfully modifies the subscriptions. The operation executes this closure only once, and it's your only opportunity to process the results. 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 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.

init · iOS 8.0+

init

TypeScript
static initSubscriptionsToSaveSubscriptionIDsToDelete(subscriptionsToSave?: (Array<CKSubscription>) | null, subscriptionIDsToDelete?: (Array<string>) | null): CKModifySubscriptionsOperation
Swift declaration
convenience init(subscriptionsToSave: [CKSubscription]? = nil, subscriptionIDsToDelete: [CKSubscription.ID]? = nil)

Creates an operation for saving and deleting the specified subscriptions. - Parameters: - subscriptionsToSave: The subscriptions to save or update. You can specify `nil` for this parameter. - subscriptionIDsToDelete: The IDs of the subscriptions to delete. You can specify `nil` for this parameter. The subscriptions that you want to save or delete must reside in the same container. CloudKit creates a subscription if you save one that doesn't already exist. CloudKit returns an error if you try to delete a subscription that doesn't exist.

get · iOS 8.0+

subscriptionIDsToDelete

TypeScript
get subscriptionIDsToDelete(): (Array<string>) | null
Swift declaration
var subscriptionIDsToDelete: [CKSubscription.ID]? { get set }

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.

set · iOS 8.0+

subscriptionIDsToDelete

TypeScript
set subscriptionIDsToDelete(value: (Array<string>) | null)
Swift declaration
var subscriptionIDsToDelete: [CKSubscription.ID]? { get set }

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.

get · iOS 15.0+

perSubscriptionSaveBlock

TypeScript
get perSubscriptionSaveBlock(): (((arg0: string, arg1: SDKHandle) => Promise<void>)) | null
Swift declaration
var perSubscriptionSaveBlock: ((CKSubscription.ID, Result<CKSubscription, any Error>) -> Void)? { get set }

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. - A <doc://com.apple.documentation/documentation/swift/result> that contains either - The subscription that CloudKit saves - An error that provides information about a failure saving the subscription. 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.

set · iOS 15.0+

perSubscriptionSaveBlock

TypeScript
set perSubscriptionSaveBlock(value: (((arg0: string, arg1: SDKHandle) => void)) | null)
Swift declaration
var perSubscriptionSaveBlock: ((CKSubscription.ID, Result<CKSubscription, any Error>) -> Void)? { get set }

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. - A <doc://com.apple.documentation/documentation/swift/result> that contains either - The subscription that CloudKit saves - An error that provides information about a failure saving the subscription. 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.

get · iOS 15.0+

perSubscriptionDeleteBlock

TypeScript
get perSubscriptionDeleteBlock(): (((arg0: string, arg1: SDKHandle) => Promise<void>)) | null
Swift declaration
var perSubscriptionDeleteBlock: ((CKSubscription.ID, Result<Void, any Error>) -> Void)? { get set }

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. - A <doc://com.apple.documentation/documentation/swift/result> that contains either - A successful `Result` - An error that provides information about a failure deleting the subscription. The closure executes once for each subscription in the ``CKModifySubscriptionsOperation/subscriptionIDsToDelete-3534e`` 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.

set · iOS 15.0+

perSubscriptionDeleteBlock

TypeScript
set perSubscriptionDeleteBlock(value: (((arg0: string, arg1: SDKHandle) => void)) | null)
Swift declaration
var perSubscriptionDeleteBlock: ((CKSubscription.ID, Result<Void, any Error>) -> Void)? { get set }

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. - A <doc://com.apple.documentation/documentation/swift/result> that contains either - A successful `Result` - An error that provides information about a failure deleting the subscription. The closure executes once for each subscription in the ``CKModifySubscriptionsOperation/subscriptionIDsToDelete-3534e`` 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.

Skipped declarations

No declarations were skipped in this snapshot.

All CloudKit types →