fetchAllSubscriptionsOperation
TypeScriptstatic fetchAllSubscriptionsOperation(): CKFetchSubscriptionsOperationSwift declarationclass func fetchAllSubscriptionsOperation() -> Selfclass · iOS 8.0+ · SDK 27.1
class CKFetchSubscriptionsOperationstatic fetchAllSubscriptionsOperation(): CKFetchSubscriptionsOperationSwift declarationclass func fetchAllSubscriptionsOperation() -> Selfstatic init(): CKFetchSubscriptionsOperationSwift declarationinit()get fetchSubscriptionsResultBlock(): (((arg0: SDKHandle) => Promise<void>)) | nullSwift declarationvar fetchSubscriptionsResultBlock: ((Result<Void, any Error>) -> Void)? { get set }The closure to execute after CloudKit retrieves all of the subscriptions. This property is a closure that returns no value and has 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 retrieving the subscriptions. The fetch operation executes this closure only once. The closure executes before the operation's completion closure. The closure 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.
set fetchSubscriptionsResultBlock(value: (((arg0: SDKHandle) => void)) | null)Swift declarationvar fetchSubscriptionsResultBlock: ((Result<Void, any Error>) -> Void)? { get set }The closure to execute after CloudKit retrieves all of the subscriptions. This property is a closure that returns no value and has 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 retrieving the subscriptions. The fetch operation executes this closure only once. The closure executes before the operation's completion closure. The closure 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.
static initSubscriptionIDs(subscriptionIDs: Array<string>): CKFetchSubscriptionsOperationSwift declarationconvenience init(subscriptionIDs: [CKSubscription.ID])Creates an operation for fetching the specified subscriptions. - Parameters: - subscriptionIDs: An array of strings where each one is an ID of a subscription that you want to retrieve. This parameter sets the ``CKFetchSubscriptionsOperation/subscriptionIDs-714ct`` property's value. If you specify `nil`, you must set the `subscriptionIDs` property before you execute the operation. After creating the operation, assign a closure to the ``CKFetchSubscriptionsOperation/fetchSubscriptionCompletionBlock-207ep`` property to process the results.
get subscriptionIDs(): (Array<string>) | nullSwift declarationvar subscriptionIDs: [CKSubscription.ID]? { get set }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`.
set subscriptionIDs(value: (Array<string>) | null)Swift declarationvar subscriptionIDs: [CKSubscription.ID]? { get set }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`.
get perSubscriptionResultBlock(): (((arg0: string, arg1: SDKHandle) => Promise<void>)) | nullSwift declarationvar perSubscriptionResultBlock: ((CKSubscription.ID, Result<CKSubscription, any Error>) -> Void)? { get set }The closure to execute when a subscription becomes available. This property is a closure that returns no value and has the following parameters: - The ID of the subscription. - A <doc://com.apple.documentation/documentation/swift/result> that contains either a retrieved subscription, or an error that describes why CloudKit can't retrieve the subscription. The fetch operation executes this closure once for each subscription ID in the ``CKFetchSubscriptionsOperation/subscriptionIDs-17f4q`` 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.
set perSubscriptionResultBlock(value: (((arg0: string, arg1: SDKHandle) => void)) | null)Swift declarationvar perSubscriptionResultBlock: ((CKSubscription.ID, Result<CKSubscription, any Error>) -> Void)? { get set }The closure to execute when a subscription becomes available. This property is a closure that returns no value and has the following parameters: - The ID of the subscription. - A <doc://com.apple.documentation/documentation/swift/result> that contains either a retrieved subscription, or an error that describes why CloudKit can't retrieve the subscription. The fetch operation executes this closure once for each subscription ID in the ``CKFetchSubscriptionsOperation/subscriptionIDs-17f4q`` 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.
get fetchSubscriptionCompletionBlock(): (((arg0: (Record<string, CKSubscription>) | null, arg1: (NativeError) | null) => Promise<void>)) | nullSwift declarationvar fetchSubscriptionCompletionBlock: (([CKSubscription.ID : CKSubscription]?, (any Error)?) -> Void)? { get set }The block to execute with the fetch results. The closure returns no value and takes the following parameters: - A dictionary with keys that are the IDs of the subscriptions you request, and values that are the corresponding subscriptions. - An error that contains information about a problem, or `nil` if the system successfully fetches 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 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.
set fetchSubscriptionCompletionBlock(value: (((arg0: (Record<string, CKSubscription>) | null, arg1: (NativeError) | null) => void)) | null)Swift declarationvar fetchSubscriptionCompletionBlock: (([CKSubscription.ID : CKSubscription]?, (any Error)?) -> Void)? { get set }The block to execute with the fetch results. The closure returns no value and takes the following parameters: - A dictionary with keys that are the IDs of the subscriptions you request, and values that are the corresponding subscriptions. - An error that contains information about a problem, or `nil` if the system successfully fetches 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 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.
No declarations were skipped in this snapshot.