---
title: "init(rootRecord:)"
framework: cloudkit
role: symbol
role_heading: Initializer
path: "cloudkit/ckshare/init(rootrecord:)"
---

# init(rootRecord:)

Creates a new share for the specified record.

## Declaration

```swift
convenience init(rootRecord: CKRecord)
```

## Parameters

- `rootRecord`: The record to share.

## Discussion

Discussion When saving a newly created CKShare, you save both the share and its rootRecord in the same CKModifyRecordsOperation batch.

## See Also

### Creating a Share

- [init(coder:)](cloudkit/ckshare/init(coder:).md)
- [init(rootRecord:shareID:)](cloudkit/ckshare/init(rootrecord:shareid:).md)
- [init(recordZoneID:)](cloudkit/ckshare/init(recordzoneid:).md)
