---
title: "init(zoneID:)"
framework: cloudkit
role: symbol
role_heading: Initializer
path: "cloudkit/ckrecordzone/init(zoneid:)"
---

# init(zoneID:)

Creates a record zone object with the specified zone ID.

## Declaration

```swift
init(zoneID: CKRecordZone.ID)
```

## Parameters

- `zoneID`: The ID for the new zone. This parameter must not be nil.

## Return Value

Return Value The custom record zone.

## Discussion

Discussion Use this method when you want to create a new record zone from the information in a zone ID. After creating the zone, save it to the server using a CKModifyRecordZonesOperation object or the save(_:completionHandler:) method of CKDatabase. Don’t use this method to create a CKRecordZone object that corresponds to a zone that already exists in the database. If the zone exists, fetch it using a CKFetchRecordZonesOperation object or the fetch(withRecordZoneID:completionHandler:) method of CKDatabase.

## See Also

### Creating a Record Zone

- [init(zoneName:)](cloudkit/ckrecordzone/init(zonename:).md)
- [CKRecordZone.ID](cloudkit/ckrecordzone/id.md)
