Skip to content

Instantly share code, notes, and snippets.

@dan085
Forked from adrianotadao/ExtensionRule.xml
Created May 11, 2017 03:48
Show Gist options
  • Save dan085/ec9502794a7073e018f009092cb97f69 to your computer and use it in GitHub Desktop.
Save dan085/ec9502794a7073e018f009092cb97f69 to your computer and use it in GitHub Desktop.
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>
SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url" ||
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text" ||
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.data"
AND NOT (ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg")
AND NOT (ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.png")
AND NOT (ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.peg-2000")
AND NOT (ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.camera-raw-imag")
AND NOT (ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.public.xbitmap-image")
AND NOT (ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie")
).@count == $extensionItem.attachments.@count
).@count &gt; 0
</string>
</dict>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment