Shared images can have type URL, but they may also have type UIImage.
Our share extension was crashing when an image was shared from a screenshot preview, or from the Twitter app, but not when images were shared from the Photos app, etc.
This change worked for us: if the shared image is a UIImage, then download it to a tmp directory and use that as the src url for the copied image.
Shared images can have type
URL
, but they may also have typeUIImage
.Our share extension was crashing when an image was shared from a screenshot preview, or from the Twitter app, but not when images were shared from the Photos app, etc.
This change worked for us: if the shared image is a
UIImage
, then download it to a tmp directory and use that as the src url for the copied image.