<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKDatabase/fetchAllSubscriptions(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKDatabase(im)fetchAllSubscriptionsWithCompletionHandler:"
  },
  "title" : "fetchAllSubscriptions(completionHandler:)"
}
-->

# fetchAllSubscriptions(completionHandler:)

Fetches all subscriptions from the current database.

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

## 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()`](/documentation/CloudKit/CKFetchSubscriptionsOperation/fetchAllSubscriptionsOperation()).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)