Posts

Post not yet marked as solved
1 Replies
1k Views
I have created an iOS Share Extension, and am returning a simple NSItemProvider: let item = NSItemProvider(item: "A Response" as NSSecureCoding, typeIdentifier: kUTTypeText as String) let extensionItem = NSExtensionItem() extensionItem.attachments = [item] self.extensionContext!.completeRequest(returningItems: [extensionItem], completionHandler: nil)But in the host app, in the completionWithItemsHandler, completed is true, yet, returnedItems is nil. activityController.completionWithItemsHandler = { (activity, completed, items, error) in print("\(items?.count)") }Yet, returning the exact same response in an ActionExtension, the result reached the host app. Does a Share Extension not send its response back to the host app? The docs would suggest otherwise: https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Share.html#//apple_ref/doc/uid/TP40014214-CH12-SW1Sample project: http://gofile.me/2oQIB/s9zxCa58g
Posted
by David M.
Last updated
.