iOS share extension: need to share all the pdf files including web link pdf files through my share extension

Viewed 1945

I need to share pdf files from other application through my Share extension. In my share extension, I am using this NSExtensionActivationRule

<key>NSExtensionActivationRule</key>
<string>SUBQUERY (
        extensionItems,
        $extensionItem,
        SUBQUERY (
           $extensionItem.attachments,
           $attachment,(
           ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.adobe.pdf";
           || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url";
        ).@count == $extensionItem.attachments.@count
   ).@count == 1
</string>

For URL contents, I was able to see my app icon in all the activation controllers of other applications. But I need to activate the extension only for PDF urls.

Can I create an NSExtensionActivationRule, which can select all the pdf files for sharing through Share extension including URL and contents.?

1 Answers
Related