<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "swift: 4.2.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKRecordZoneSubscription/init(zoneID:subscriptionID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So24CKRecordZoneSubscriptionC8CloudKitE6zoneID012subscriptionG0ABSo0abG0C_SStcfc"
  },
  "title" : "init(zoneID:subscriptionID:)"
}
-->

# init(zoneID:subscriptionID:)

Creates a named subscription for all records in the specified record zone.

```
convenience init(zoneID: CKRecordZone.ID, subscriptionID: CKSubscription.ID)
```

## Parameters

`zoneID`

The ID of the record zone that contains the records you want to monitor.

`subscriptionID`

The subscription’s name. It must be unique in the container and must not be an empty string.

## Discussion

The subscription that this method returns is a zone-based subscription that generates push notifications when CloudKit changes any of the specified record zone’s records.

---

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)