Hide Share extension from UIActivityViewController when user selects a directory

I'm looking to hide my app extension from the UIActivityViewController when a user selects a directory.

I have tried through specifying the dictionary on NSExtensionActivationRule with the available keys, but it seems that there is no key that considers directories:

NSExtensionActivationSupportsAttachmentsWithMaxCount
NSExtensionActivationSupportsAttachmentsWithMinCount
NSExtensionActivationSupportsFileWithMaxCount
NSExtensionActivationSupportsImageWithMaxCount
NSExtensionActivationSupportsMovieWithMaxCount
NSExtensionActivationSupportsText
NSExtensionActivationSupportsWebURLWithMaxCount
NSExtensionActivationSupportsWebPageWithMaxCount

As an alternative I'm using the string option, providing the following predicate that considers up to 5 files, 5 images, 1 video and 0 directories:

SUBQUERY (
    extensionItems,
    $extensionItem,
    SUBQUERY (
        $extensionItem.attachments,
        $attachment,
        ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie"
    ).@count <= 1
    AND
    SUBQUERY (
        $extensionItem.attachments,
        $attachment,
        ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
    ).@count <= 5
    AND
    SUBQUERY (
        $extensionItem.attachments,
        $attachment,
        ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url"
    ).@count <= 5
    AND
    SUBQUERY (
        $extensionItem.attachments,
        $attachment,
        ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.directory"
    ).@count == 0
).@count >= 0

The predicate works for the video, image and file limitations, but when it comes to directories, the extension keeps appearing.

Is there any way to achieve this?

Hide Share extension from UIActivityViewController when user selects a directory
 
 
Q