2017-08-01 114 views
0

我正在研究應用程序擴展,該應用程序擴展應該可以幫助我通過亞馬遜應用程序中的分享表或Safari瀏覽亞馬遜時獲取文章URL。NSExtensionActivationRule for iOS Share Extension無法正常工作

對於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/content/documentation/General/Reference/InfoPlistKeyReference/Articles/AppExtensionKeys.html

回答

0

建立這樣的plist中時,它爲我的作品: enter image description here