Contents

accept(_:)

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

Declaration

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

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

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.