ios - NSExtensionActivationRule for Safari - Stack Overflow

admin2025-03-19  1

I have NSExtensionActivationRule in the ShareExtension as below:

SUBQUERY(
    extensionItems,
    $extensionItem,
    SUBQUERY(
        $extensionItem.attachments,
        $attachment,
        ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text"
    ).@count >= 1
).@count >= 1
OR 
SUBQUERY(
    extensionItems,
    $extensionItem,
    SUBQUERY(
        $extensionItem.attachments,
        $attachment,
        ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
        || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.content"
        || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.apple.webarchive"
    ).@count == $extensionItem.attachments.@count
).@count >= 1
OR 
SUBQUERY(
    extensionItems,
    $extensionItem,
    SUBQUERY(
        $extensionItem.attachments,
        $attachment,
        ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
        || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie"
    ).@count == $extensionItem.attachments.@count AND $extensionItem.attachments.@count <= 3
).@count == 1

I can see my app from Photo's share option, but I can't see it from Safari's share option. If I select either PDF or Web Archive from share Options, then I can see my app. What am I missing?

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1742337993a208300.html

最新回复(0)