简体   繁体   中英

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

我的应用程序工作正常,直到iOS 8但在iOS 9 Beta中我无法共享Notes文本/图像所以,请你建议我认为我需要为此实现什么?

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM