NSExtensionActivationRule for iOS Share Extension无法正常工作

问题描述 投票:0回答:1

我正在开发一个应用程序扩展,这应该可以帮助我通过亚马逊应用程序中的分享表或在亚马逊冲浪时在safari中获取文章URL。

对于safari,我收到类型为kUTTypeURL的信息。从亚马逊,我得到的URL类型为kUTTypeText。只要我没有在info.plist中设置NSExtensionActivationRule,它就可以正常工作。现在它只适用于Safari,但不适用于亚马逊。这是我现在的plist:

enter image description here

我添加了DictionaryVersion,因为我想避免它无法正常工作,因为亚马逊不提供URL和文本 - 但我的应用程序不再出现在亚马逊的分享表中。

我已经检查过stackoverflow的帮助,例如IOS Share extension: how to read from notes posts,以及这里的苹果文档:https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/AppExtensionKeys.html

ios safari ios-extensions ios-sharesheet
1个回答
0
投票

在设置像这样的plist时它适用于我:enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.