Contents

shareMetadatas(for:)

Fetches share metadatas for the specified share URLs and returns them to an awaiting caller.

Declaration

func shareMetadatas(for urls: [URL]) async throws -> [URL : Result<CKShare.Metadata, any Error>]

Parameters

  • urls:

    The share URLs that CloudKit uses to locate the metadatas.

Return Value

A dictionary of fetched share metadatas. The dictionary uses the URLs you specify in urls as its keys. The value of each key is a Result that contains either the corresponding fetched share metadata, or an error that describes why CloudKit can’t fetch that share metadata.

Discussion

This method searches for share metadatas asynchronously and with a low priority. If you want the task to execute with a higher priority, create an instance of CKFetchShareMetadataOperation and configure it to use the necessary priority.