gpt4 book ai didi

iOS 11 PDF分享扩展

转载 作者:可可西里 更新时间:2023-11-01 04:43:08 24 4
gpt4 key购买 nike

我有以下规则集

<dict>
<key>NSExtensionActivationRule</key>
<string>
SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.adobe.pdf" OR
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url" OR
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text" OR
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text" OR
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "pdf" OR
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.pdf" OR
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
).@count == $extensionItem.attachments.@count
).@count == 1
</string>
<key>NSExtensionJavaScriptPreprocessingFile</key>
<string>JavascriptPreprocessor</string>
</dict>

当我去 safari 浏览 pdf 时,在 iOS 10 中我看到了我在 iOS 11 上的共享扩展,但我没有看到它。是否有一个额外的 uti-conforms-to 我需要添加到它才能在任何人都知道的 iOS 11 上工作?

最佳答案

我遇到了完全相同的问题,我注意到某些 UTI(例如 public.url)禁用了 pdf UTI。如果删除它们,则在从网页加载 pdf 时会显示扩展名。换句话说,似乎包括一个禁用另一个。我的解决方案是手动查找适用于 pdf 和网页的 UTI。如果 pdf 来自网页,此配置应该适用于 iOS 11.0 和以前的版本(至少它适用于带有 xcode9 的模拟器)。

SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
(
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text";
)
).@count == $extensionItem.attachments.@count
).@count == 1

更新:我已经添加了

|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text"

允许 Chrome 和 Firefox 在 html 和 pdf 文档中看到扩展。

关于iOS 11 PDF分享扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46826806/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com