Instance Method


Fetches metadata for the given URL.


func startFetchingMetadata(for URL: URL, completionHandler: @escaping (LPLinkMetadata?, Error?) -> Void)


Call this method once per LPMetadataProvider instance. If you attempt to fetch metadata multiple times on a single LPMetadataProvider instance, it throws an error.

The completion handler executes on a background queue. Dispatch any necessary UI updates back to the main queue. When the completion handler returns, it deletes any file URLs returned in the resulting LPLinkMetadata.

See Also

Fetching Metadata

func cancel()

Cancels a metadata request.

var shouldFetchSubresources: Bool

A Boolean value indicating whether to download subresources specified by the metadata.

var timeout: TimeInterval

The time interval after which the request automatically fails if it hasn’t already completed.