[英]share extension subquery to limit the item types
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
I want to support only images, pdf and url
. 我想只支持
images, pdf and url
。
But share extension
is visible in all types. 但
share extension
在所有类型中都可见。 ie videos, contacts etc. 即视频,联系人等
This is because of the line: 这是因为这条线:
).@count <= 10
It returns true
for 0
, that means true
for no match, so your extension will return true
for every type. 它返回
true
为0
,这意味着true
的不匹配,使您的扩展将返回true
为每一个类型。 Change this line to the following if you want to limit the image count to 10. 如果要将图像数量限制为10,请将此行更改为以下内容。
).@count == $extensionItem.attachments.@count AND $extensionItem.attachments.@count <= 10"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.