---
title: "init(zoneName:ownerName:)"
framework: cloudkit
role: symbol
role_heading: Initializer
path: "cloudkit/ckrecordzone/id/init(zonename:ownername:)-22irr"
---

# init(zoneName:ownerName:)

Creates a record zone ID with the specified name and owner.

## Declaration

```swift
convenience init(zoneName: String = CKRecordZone.ID.defaultZoneName, ownerName: String = CKCurrentUserDefaultName)
```

## Parameters

- `zoneName`: The name that identifies the record zone. Zone names consist of up to 255 ASCII characters, and don’t start with an underscore. To specify the default zone of the current database, use doc://com.apple.cloudkit/documentation/CloudKit/CKRecordZone/ID/defaultZoneName. This parameter must not be nil or an empty string.
- `ownerName`: The user who creates the record zone. To specify the current user, use doc://com.apple.cloudkit/documentation/CloudKit/CKCurrentUserDefaultName. If you provide nil or an empty string for this parameter, the method throws an exception.

## Return Value

Return Value A new record zone ID.
