Friday, August 19, 2022
HomeiOS Developmentios - UIActivityViewController Not Sharing Each URL & Textual content in Messages

ios – UIActivityViewController Not Sharing Each URL & Textual content in Messages


I’ve a UIActivityViewController which takes in an array of URLs that resolve to photographs inside the app’s Paperwork folder and Strings:

var contentArray = [Any]();
contentArray.append("Take a look at Textual content");
contentArray.append(URL(<<legitimate url to picture in app's paperwork folder>>));

let shareSheet = UIActivityViewController(activityItems: contentArray, applicationActivities: nil);

if let popoverController = shareSheet.popoverPresentationController {
    popoverController.sourceView = <<legitimate reference to sending view>>;
}

self.current(shareSheet, animated: true);

When the consumer clicks “Messages” it solely exhibits the picture that was retrieved from the native URL and the String “Take a look at Textual content” isn’t appended to the message physique.

Nonetheless, if the URL is modified to an exterior URL resembling https://google.com, each the URL and the “Take a look at Textual content” seem within the Messages physique.

Is there a purpose each textual content (Strings) and pictures (URLs linking to the app’s paperwork folder) aren’t proven within the Messages physique?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments