init
TypeScriptstatic init(): CKModifySubscriptionsOperationSwift declarationinit()class · iOS 8.0+ · SDK 27.1
class CKModifySubscriptionsOperationstatic init(): CKModifySubscriptionsOperationSwift declarationinit()get subscriptionsToSave(): (Array<CKSubscription>) | nullSwift declarationvar subscriptionsToSave: [CKSubscription]? { get set }set subscriptionsToSave(value: (Array<CKSubscription>) | null)Swift declarationvar subscriptionsToSave: [CKSubscription]? { get set }get modifySubscriptionsResultBlock(): (((arg0: SDKHandle) => Promise<void>)) | nullSwift declarationvar 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 modifySubscriptionsResultBlock(value: (((arg0: SDKHandle) => void)) | null)Swift declarationvar 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 modifySubscriptionsCompletionBlock(): (((arg0: (Array<CKSubscription>) | null, arg1: (Array<string>) | null, arg2: (NativeError) | null) => Promise<void>)) | nullSwift declarationvar 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 modifySubscriptionsCompletionBlock(value: (((arg0: (Array<CKSubscription>) | null, arg1: (Array<string>) | null, arg2: (NativeError) | null) => void)) | null)Swift declarationvar 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.
static initSubscriptionsToSaveSubscriptionIDsToDelete(subscriptionsToSave?: (Array<CKSubscription>) | null, subscriptionIDsToDelete?: (Array<string>) | null): CKModifySubscriptionsOperationSwift declarationconvenience 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 subscriptionIDsToDelete(): (Array<string>) | nullSwift declarationvar 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 subscriptionIDsToDelete(value: (Array<string>) | null)Swift declarationvar 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 perSubscriptionSaveBlock(): (((arg0: string, arg1: SDKHandle) => Promise<void>)) | nullSwift declarationvar 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 perSubscriptionSaveBlock(value: (((arg0: string, arg1: SDKHandle) => void)) | null)Swift declarationvar 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 perSubscriptionDeleteBlock(): (((arg0: string, arg1: SDKHandle) => Promise<void>)) | nullSwift declarationvar 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 perSubscriptionDeleteBlock(value: (((arg0: string, arg1: SDKHandle) => void)) | null)Swift declarationvar 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.
No declarations were skipped in this snapshot.