<!--
{
  "availability" : [
    "watchOS: 7.0.0 - 9.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "WatchKit",
  "identifier" : "/documentation/WatchKit/WKExtensionDelegate/userDidAcceptCloudKitShare(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WatchKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WKExtensionDelegate(im)userDidAcceptCloudKitShareWithMetadata:"
  },
  "title" : "userDidAcceptCloudKitShare(with:)"
}
-->

# userDidAcceptCloudKitShare(with:)

Tells the delegate that the app has access to shared information in CloudKit.

```
optional func userDidAcceptCloudKitShare(with cloudKitShareMetadata: CKShareMetadata)
```

## Parameters

`cloudKitShareMetadata`

Information about the CloudKit data that is available to the app. Use this object to retrieve information about the <doc://com.apple.documentation/documentation/CloudKit/CKShare> object and the associated records that are available.

## Discussion

Use this method to respond to a CloudKit Sharing invitation. In your implementation, accept the share by scheduling a <doc://com.apple.documentation/documentation/CloudKit/CKAcceptSharesOperation> object that contains the provided metadata object. After the user accepts the share, you can begin fetching records and incorporating the resulting data into your app.

The system launches the app, as necessary, before calling this method.

---

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)