<!--
{
  "availability" : [
    "iOS: 10.0.0 - 26.0.0",
    "iPadOS: 10.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "tvOS: 10.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplicationDelegate/application(_:userDidAcceptCloudKitShareWith:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIApplicationDelegate(im)application:userDidAcceptCloudKitShareWithMetadata:"
  },
  "title" : "application(_:userDidAcceptCloudKitShareWith:)"
}
-->

# application(_:userDidAcceptCloudKitShareWith:)

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

```
optional func application(_ application: UIApplication, userDidAcceptCloudKitShareWith cloudKitShareMetadata: CKShareMetadata)
```

## Parameters

`application`

The shared app object.

`cloudKitShareMetadata`

Information about the CloudKit data that is now 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 now available.

## Discussion

If your app doesn’t support scenes, 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 metadata object in the `cloudKitShareMetadata` parameter. After the share has been accepted, you can begin fetching records and incorporating the resulting data into your app. For a scene-based app, accept the invitation in your window scene delegate’s [`windowScene(_:userDidAcceptCloudKitShareWith:)`](/documentation/UIKit/UIWindowSceneDelegate/windowScene(_:userDidAcceptCloudKitShareWith:)) method.

The system launches the app, as needed, 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)