Contents

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 nil if CloudKit can’t provide the subscriptions.

  • An error if a problem occurs, or nil if the fetch completes successfully.

For information on a more configurable way to fetch all subscriptions from a specific database, see fetchAllSubscriptionsOperation().

See Also

Fetching Subscriptions