<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKContainer/requestShareAccess(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So11CKContainerC8CloudKitE18requestShareAccess3forSDy10Foundation3URLVs6ResultOyyts5Error_pGGSayAHG_tYaKF"
  },
  "title" : "requestShareAccess(for:)"
}
-->

# requestShareAccess(for:)

Requests access to the specified share URLs, and returns the results to an awaiting caller.

```
func requestShareAccess(for urls: [URL]) async throws -> [URL : Result<Void, any Error>]
```

## Parameters

`urls`

The share URLs that CloudKit uses to locate the shares.

## Return Value

A dictionary of acceptance results. The dictionary uses the urls you specify in `urls` as its keys. The value of each key is a <doc://com.apple.documentation/documentation/Swift/Result>: `.success(())` when CloudKit grants access to that share, or an error that describes why CloudKit can’t request access to that share.

## Discussion

This method requests access to shares asynchronously and with a low priority. If you want the task to execute with a higher priority, create an instance of [`CKShareRequestAccessOperation`](/documentation/CloudKit/CKShareRequestAccessOperation) and configure it to use the necessary priority.

---

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)