<!--
{
  "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/fetchSubscriptionWithID:completionHandler:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKDatabase(im)fetchSubscriptionWithID:completionHandler:"
  },
  "title" : "fetchSubscriptionWithID:completionHandler:"
}
-->

# fetchSubscriptionWithID:completionHandler:

Fetches a specific subscription and delivers it to a completion handler.

```
- (void) fetchSubscriptionWithID:(CKSubscriptionID) subscriptionID completionHandler:(void (^)(CKSubscription *subscription, NSError *error)) completionHandler;
```

## Parameters

`subscriptionID`

The identifier of the subscription to fetch.

`completionHandler`

The block to execute with the fetch results.

## Discussion

The completion handler takes the following parameters:

- `subscription`: The requested subscription, or `nil` if CloudKit can’t provide that subscription.
- `error`: An error if a problem occurs, or `nil` if the fetch completes successfully.

For information on a more configurable way to fetch specific subscriptions, see [`CKFetchSubscriptionsOperation`](/documentation/CloudKit/CKFetchSubscriptionsOperation).

---

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)