---
title: "init(recordName:)"
framework: cloudkit
role: symbol
role_heading: Initializer
path: "cloudkit/ckrecord/id/init(recordname:)"
---

# init(recordName:)

Creates a new record ID with the specified name in the default zone.

## Declaration

```swift
convenience init(recordName: String)
```

## Parameters

- `recordName`: The name that identifies the record. The string must contain only ASCII characters, must not exceed 255 characters, and must not start with an underscore. If you specify an empty string for this parameter, the method throws an exception.

## Return Value

Return Value An initialized record ID object.

## Discussion

Discussion Use this method when you’re creating or searching for records in the default zone.

## See Also

### Creating a Record ID

- [init(recordName:zoneID:)](cloudkit/ckrecord/id/init(recordname:zoneid:).md)
- [CKRecordNameZoneWideShare](cloudkit/ckrecordnamezonewideshare.md)
