---
title: "accept(_:)"
framework: cloudkit
role: symbol
role_heading: Instance Method
path: "cloudkit/ckcontainer/accept(_:)-t0ny"
---

# accept(_:)

Accepts the specified share metadatas and returns the accepted shares to an awaiting caller.

## Declaration

```swift
func accept(_ metadatas: [CKShare.Metadata]) async throws -> [CKShare.Metadata : Result<CKShare, any Error>]
```

## Parameters

- `metadatas`: The share metadatas of the shares to accept.

## Return Value

Return Value A dictionary of accepted shares. The dictionary uses the share metadatas you specify in metadatas as its keys. The value of each key is a Result that contains either the corresponding accepted share, or an error that describes why CloudKit can’t accept that share.

## Discussion

Discussion This method accepts shares asynchronously and with a low priority. If you want the task to execute with a higher priority, create an instance of CKAcceptSharesOperation and configure it to use the necessary priority.
