SUBQUERY(
extensionItems,
$extensionItem,
SUBQUERY(
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.adobe.pdf"
).@count == 1
).@count == 1
OR
SUBQUERY(
extensionItems,
$extensionItem,
SUBQUERY(
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
).@count <= 10
).@count == 1
OR
SUBQUERY(
extensionItems,
$extensionItem,
SUBQUERY(
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
).@count == 1
).@count == 1
我只想支持images, pdf and url
。
但share extension
在所有类型中都可见。即视频,联系人等。
答案 0 :(得分:1)
这是因为行:
).@count <= 10
它返回true
0
,这意味着true
没有匹配,因此您的扩展程序将为每种类型返回true
。如果要将图像数量限制为10,请将此行更改为以下内容。
).@count == $extensionItem.attachments.@count AND $extensionItem.attachments.@count <= 10"