In ShareExtension plist, I set the NSExtensionActivationRule as followed, our app will not show in the activityView in Photo sharing.
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
).@count >= 1
).@count > 0</string>
</dict>
If I change the NSExtensionActivationRule to something like this, it works well.
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>10</integer>
<key>NSExtensionActivationSupportsAttachmentsWithMaxCount</key>
<integer>20</integer>
</dict>
If anyone has similar issues or already knowns how to use SUBQUERY in NSExtensionActivationRule, I would be very thankful.