Contents

fetchShareMetadata(with:completionHandler:)

Fetches the share metadata for the specified share URL.

Declaration

func fetchShareMetadata(with url: URL, completionHandler: @escaping  @Sendable (CKShare.Metadata?, (any Error)?) -> Void)
func shareMetadata(for url: URL) async throws -> CKShare.Metadata

Parameters

  • url:

    The share URL that CloudKit uses to locate the metadata.

  • completionHandler:

    The handler to execute with the fetch results.

Discussion

The closure doesn’t return a value and takes the following parameters:

  • The share metadata, or nil if CloudKit can’t find the metadata.

  • An error if a problem occurs, or nil if CloudKit successfully retrieves the metadata.

See Also

Accessing Container Metadata