I use the predicate below as NSExtensionActivationRule for my Share Extension. It shows my extension in the share sheet if the host app provides a public.url OR plain.text.
My question: is there a way to evaluate the URL to decide if my extension should be visible in the share sheet? For example, I would only like to show it if the url matches "https://mydomain.com". I don't think this can be done, but want to be sure.
SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
).@count == 1
).@count == 1
||
SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text"
).@count == 1
).@count == 1