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

白昼怎懂夜的黑 提交于 2019-12-01 09:18:07
Add **NSExtensionActivationDictionaryVersion** Attributes in your plist file.

see this image for reference.

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