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.MetadataParameters
- 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
nilif CloudKit can’t find the metadata.An error if a problem occurs, or
nilif CloudKit successfully retrieves the metadata.