fetchAllSubscriptions(completionHandler:)
Fetches all subscriptions from the current database.
Declaration
func fetchAllSubscriptions(completionHandler: @escaping @Sendable ([CKSubscription]?, (any Error)?) -> Void)func allSubscriptions() async throws -> [CKSubscription]Parameters
- completionHandler:
The closure to execute with the fetch results.
Discussion
The completion handler takes the following parameters:
The database’s subscriptions, or
nilif CloudKit can’t provide the subscriptions.An error if a problem occurs, or
nilif the fetch completes successfully.
For information on a more configurable way to fetch all subscriptions from a specific database, see fetchAllSubscriptionsOperation().