---
title: "fetchAllSubscriptions(completionHandler:)"
framework: cloudkit
role: symbol
role_heading: Instance Method
path: "cloudkit/ckdatabase/fetchallsubscriptions(completionhandler:)"
---

# fetchAllSubscriptions(completionHandler:)

Fetches all subscriptions from the current database.

## Declaration

```swift
func fetchAllSubscriptions(completionHandler: @escaping @Sendable ([CKSubscription]?, (any Error)?) -> Void)
```

## Parameters

- `completionHandler`: The closure to execute with the fetch results.

## Discussion

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

- [subscriptions(for:)](cloudkit/ckdatabase/subscriptions(for:).md)
- [fetch(withSubscriptionIDs:completionHandler:)](cloudkit/ckdatabase/fetch(withsubscriptionids:completionhandler:).md)
- [subscription(for:)](cloudkit/ckdatabase/subscription(for:).md)
- [fetch(withSubscriptionID:completionHandler:)](cloudkit/ckdatabase/fetch(withsubscriptionid:completionhandler:).md)
