ios – UIActivityViewController LPLinkMetadata Show Subject


I’ve a neighborhood picture, url, and title that I efficiently share as LPLinkMetadata via UIActivityViewController. It shows accurately. Once I ship a check iMessage to myself although, I discover the despatched message doesn’t show in the identical manner for the recipient. The title and picture are overriden by the url.

Replace: I imagine the issue is within the code beneath. So I attempted returning the entire linkMetaData, and whereas the icon, title, and picture show accurately, when I attempt to share through the content material to share is empty…

func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivity.ActivityType?) -> Any? {
    return linkMetaData.originalURL

Any ideas can be significantly appreciated.

My code reply relies off this Medium article I had came upon.


Leave a Reply