I want to use LPMetadataProvider
(new on iOS 13) to get an image representation for a link (for instance the header image for a news article link).
let provider = LPMetadataProvider()
provider.startFetchingMetadata(for: URL(string: "https://someurl/")!) { (metadata, error) in
metadata?.imageProvider?.howDoIGetTheImageOut()
})
Seemingly you can do loadDataRepresentation
, but iOS 13 docs seem to indicate more of a recommendation to use loadPreviewImage
, but I'm not sure what to pass or how to use that method.