NSExtensionActivationSupportsWebPageWithMaxCount 和 NSExtensionActivationSupportsWebURLWithMaxCount 之间的区别?

问题描述 投票:0回答:1

如果我的应用程序想要支持从 Safari 浏览器共享,我将包含以下 2 个激活规则

NSExtensionActivationSupportsWebPageWithMaxCount

NSExtensionActivationSupportsWebURLWithMaxCount

<dict>
    <key>NSExtensionActivationRule</key>
    <dict>
        <key>NSExtensionActivationSupportsWebPageWithMaxCount</key>
        <integer>1</integer>
        <key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
        <integer>1</integer>
    </dict>
</dict>

但是,有人知道这两条规则有什么区别吗?

ios swift ios-extensions
1个回答
0
投票

请注意,这个答案没有官方文档,它是基于我的实验和开发经验:

NSExtensionActivationSupportsWebURLWithMaxCount

此扩展专注于链接/URL,例如从浏览器共享 URL、添加阅读列表,有很多工具(例如 Pocket、浏览器、Raindrop)都使用此工具。

NSExtensionActivationSupportsWebPageWithMaxCount

这是专门针对网页本身的,与共享 URL 无关,您可以像网页中的叠加层一样共享整个网页内容,比方说 AdBlocker。或者也许您以前在某些浏览器中看起来像“阅读模式”。

© www.soinside.com 2019 - 2024. All rights reserved.