所有我正在努力使Share Export工作正常,但我需要像假设
如果我想仅在图像或视频的情况下显示我的应用程序。(不是图像 和视频。)我在.plist
中使用以下查询 <dict>
<key>NSExtensionActivationRule</key>
<string>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, SUBQUERY($attachment.registeredTypeIdentifiers, $uti, NOT $uti UTI-CONFORMS-TO "public.url" AND NOT $uti UTI-CONFORMS-TO "public.file-url" AND $uti UTI-CONFORMS-TO "public.plain-text").@count >= 1).@count >= 1).@count >= 1
OR
SUBQUERY(extensionItems,$extensionItem,SUBQUERY($extensionItem.attachments,$attachment,ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie").@count == $extensionItem.attachments.@count AND $extensionItem.attachments.@count <= 1 ).@count == 1
</string>
</dict>
以上查询为图片而不是public.movie
工作可以帮助我。并且所有类型都可以看到共享扩展。即vcards,联系人等我只需要文字,照片和视频。
答案 0 :(得分:0)
在子查询的以下部分中将计数10更改为1:
...
$attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
).@count <= 10).@count >= 1
...
到
...
$attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
).@count <= 1).@count >= 1
...
对于其他项目的电影,网址很好。