How to share notes data with share extension in iOS 9?

假如想象 提交于 2019-12-01 07:01:33

问题


My application is working fine till iOS 8 But in iOS 9 Beta I am not able to share Notes text/image so can you please suggest me what thinks I need to implement for this?


回答1:


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

see this image for reference.




回答2:


What to use if I am using NSPredicate for NSExtensionActivationRule?

<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>


来源:https://stackoverflow.com/questions/32305597/how-to-share-notes-data-with-share-extension-in-ios-9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!