My Share extension should accept a maximum of 4 items, images and videos combined. The extension should not accept other file types like PDFs.
So far this is my activation rule query.
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>
SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY(
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie"
).@count <= 2
AND
SUBQUERY(
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
).@count <= 2
).@count >= 1
</string>
</dict>
It works for accepting a maximum of 4 items, images and videos combined. But I cannot figure out how to exclude other file types so that my app extension is not invoked e.g. when trying to share a PDF from the Files app.