I have created a Safari Share Extension where I get a specific image from the current URL. That part is done but now I am trying to replace the preview image on the SLComposeServiceViewController with the one I scraped from the URL. I cannot seem to find a way to change the preview image that is automatically generated by SLComposeServiceViewController
How can I change this image?
I've tried looking for at the inputItems
property of NSExtenstionContext
but only can see the URL in there.
extension NSExtensionContext {
for item in self.inputItems {
if let extenstionItem = item as? NSExtensionItem {
print("attachments = \(extenstionItem.attachments)")
}
}
}
attachments = Optional([<NSItemProvider: 0x12d513e70> {types = (
"public.url"
)}])
I'm hoping that I can change this image without having to create my own view since this is the only change I need to make to the default.
Even being able to hide the image placed there by default would be helpful!