Before using the Facebook SDK, which we used to share through the UIActivityViewController, since Facebook does not allow us to pre-populate user sharing information, our solution was to use information about how a custom image image is UIPasteboard.general.string . Therefore, the application will switch to the messenger, and the user can insert it. This worked fine until we started using the Facebook SDK.
Now it seems that UIPasteboard.general.string is reset when it opens the messenger, and we can no longer get a description of the image copied to the clipboard.
Here's how I share with the messenger:
let sharePhoto = FBSDKSharePhoto() sharePhoto.image = image let content = FBSDKSharePhotoContent() content.photos = [sharePhoto] FBSDKMessageDialog.show(with: content, delegate: delegate)
source share