Open danlfarnell opened 3 years ago
The following has also been set in info.plist as per instructions from https://docs.microsoft.com/en-us/xamarin/essentials/share?context=xamarin%2Fxamarin-forms&tabs=ios
you should add an extension file and use UIActivityViewController
extension ARResultController { func presentShareSheet(for url: URL) { let objectsToShare: [Any] = [url] let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil) activityVC.popoverPresentationController?.sourceView = view present(activityVC, animated: true, completion: nil) } }
Description
When using the share plugin to share a file the following warning is logged to the debug console which warns that the request will fail in the future.
2021-11-15 16:14:54.142159-0500 testing123.iOS[5427:673207] [NSExtension] Extension request contains input items but the extension point does not specify a set of allowed payload classes. The extension point's NSExtensionContext subclass must implement
+_allowedItemPayloadClasses
. This must return the set of allowed NSExtensionItem payload classes. In future, this request will fail with an error. Extension: <EXConcreteExtension: 0x600000e7f3c0> {id = com.apple.reminders.sharingextension} Items: ( "<NSExtensionItem: 0x60000394f6b0> - userInfo: {\n NSExtensionItemAttachmentsKey = (\n \"<NSItemProvider: 0x60000103d810> {types = (\n \\"public.plain-text\\",\n \\"public.file-url\\"\n)}\"\n );\n \"com.apple.UIKit.NSExtensionItemUserInfoIsContentManagedKey\" = 0;\n}" )Steps to Reproduce
Create a new app with one button that launches the Share window using the following code.
var fileName = "testFile.txt"; File.WriteAllText("Testing", fileName);
The warning will be logged to console.
Expected Behavior
It works as expected but there is concern that it will fail in the future.
Actual Behavior
It works as expected but there is concern that it will fail in the future.
Basic Information
Version with issue: 1.7.0
Last known good version: Unsure. It exists in 1.6.1 as well however.
IDE:
Platform Target Frameworks:
Nuget Packages:
Affected Devices:
Screenshots
Reproduction Link