<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CloudKitJS",
  "identifier" : "/documentation/CloudKitJS/CloudKit.Database/shareWithUI",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit JS"
    ],
    "preciseIdentifier" : "instm/CloudKit.Database/shareWithUI"
  },
  "title" : "shareWithUI"
}
-->

# shareWithUI

Presents a UI to the user which lets them share a record with other users.

```
Promise<CloudKit.SharingUIResult, CloudKit.CKError> shareWithUI(
	Object options
);
```

## Parameters

`options`

A dictionary containing options for the share UI:
    
    |Key                   |Description                                                                                                                                                                                                                                                    |
    |----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    |`record`              |The ``doc://com.apple.cloudkitjs/documentation/CloudKitJS/CloudKit.Record`` object that is being shared.                                                                                                                                                       |
    |`zoneID`              |A ``doc://com.apple.cloudkitjs/documentation/CloudKitJS/CloudKit.ZoneID`` or zone name (`String`) that identifies the record zone in the database where you want to perform the operation. The default is the database default zone. This property is required.|
    |`shareTitle`          |The title (`String`) of the share.                                                                                                                                                                                                                             |
    |`shareType`           |The type (`String`) of the share.                                                                                                                                                                                                                              |
    |`shareThumbnail`      |A thumbnail (`String`) representing the share.                                                                                                                                                                                                                 |
    |`supportedAccess`     |The supported participant access to the share. An array of `String` objects with values `PRIVATE` or `PUBLIC`.                                                                                                                                                 |
    |`supportedPermissions`|The supported read-write permissions for the share. An array of `String` objects with values `READ_WRITE` or `READ_ONLY`.                                                                                                                                      |

## Return Value

A `Promise` object that resolves to an object that represents the share record, or rejects to a [`CKError`](/documentation/CloudKitJS/CloudKit/CKError) object.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)