如何在iOS 9中使用共享扩展共享笔记数据?

我的应用程序工作正常,直到iOS 8但在iOS 9 Beta中,我不能分享Notes文本/图像,所以你可以请我build议我认为我需要实现这个?

Add **NSExtensionActivationDictionaryVersion** Attributes in your plist file. 

看到这个图像作为参考。

在这里输入图像说明

如果我使用NSExtensionActivationRule的NSPredicate,可以使用什么?

 <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <string> SUBQUERY( extensionItems, $extensionItem, SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie" ).@count == $extensionItem.attachments.@count AND $extensionItem.attachments.@count == 1 ).@count > 0 OR SUBQUERY( extensionItems, $extensionItem, SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.png" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg-2000" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.tiff" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.compuserve.gif" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.bmp" ).@count == $extensionItem.attachments.@count AND $extensionItem.attachments.@count &lt; 6 ).@count > 0 </string> </dict>