---
title: zoneID
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckrecordzonesubscription/zoneid
---

# zoneID

The ID of the record zone that the subscription queries.

## Declaration

```swift
@NSCopying var zoneID: CKRecordZone.ID { get }
```

## Discussion

Discussion This property applies to query-based subscriptions and zone-based subscriptions. Specifying a record zone ID limits the scope of the query to only the records in that zone. For zone-based subscriptions, the query includes all records in the specified record zone. For a query-based subscription, the query includes only records of a specific type in the specified record zone. For zone-based subscriptions, CloudKit sets this property’s value automatically. For all other subscription types, the default value is nil. If you want to scope your query-based subscription to a specific record zone, you must assign a value explicitly.

## See Also

### Accessing the Subscription Metadata

- [recordType](cloudkit/ckrecordzonesubscription/recordtype-1fuqo.md)
