1

In ShareExtension plist, I set the NSExtensionActivationRule as followed, our app will not show in the activityView in Photo sharing.

<key>NSExtensionAttributes</key>
    <dict>
        <key>NSExtensionActivationRule</key>
        <string>SUBQUERY (
            extensionItems,
            $extensionItem,
            SUBQUERY (
            $extensionItem.attachments,
            $attachment,
            ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
            ).@count >= 1
            ).@count > 0</string>
    </dict>

If I change the NSExtensionActivationRule to something like this, it works well.

<key>NSExtensionActivationRule</key>
        <dict>
            <key>NSExtensionActivationSupportsImageWithMaxCount</key>
            <integer>10</integer>
            <key>NSExtensionActivationSupportsAttachmentsWithMaxCount</key>
            <integer>20</integer>
        </dict>

If anyone has similar issues or already knowns how to use SUBQUERY in NSExtensionActivationRule, I would be very thankful.

Wendy Xiao
  • 281
  • 2
  • 3
  • https://stackoverflow.com/questions/26218627/ios-appextension-how-can-i-combine-nsextensionactivationrule-and-nspredicate – user3441734 Aug 02 '17 at 17:01

0 Answers0