NSExtensionActivationRule for iOS Share Extension无法正常工作

时间:2017-08-01 13:00:23

标签: ios safari ios-extensions ios-sharesheet

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

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

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

1 个答案:

答案 0 :(得分:0)

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