Skip to content

Instantly share code, notes, and snippets.

@adrianotadao
Created January 23, 2017 18:59
Show Gist options
  • Save adrianotadao/43a03701fdc80a748759c8d3ce01c020 to your computer and use it in GitHub Desktop.
Save adrianotadao/43a03701fdc80a748759c8d3ce01c020 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