Difference between NSExtensionActivationSupportsWebPageWithMaxCount and NSExtensionActivationSupportsWebURLWithMaxCount?

160 Views Asked by At

If my app want to support sharing from Safari browser, I will include the following 2 activation rules

NSExtensionActivationSupportsWebPageWithMaxCount

NSExtensionActivationSupportsWebURLWithMaxCount

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

However, does anyone has any idea, what is the differences among the 2 rules?

1

There are 1 best solutions below

0
Anderson Oki On

Note that this answer has no official documentation and it is based on my experiments and development experience:

NSExtensionActivationSupportsWebURLWithMaxCount

This extension is focused on Links / URLs like sharing the URL from the browser, adding a reading list, there are plenty of tools like Pocket, Browsers, Raindrop that uses this one.

NSExtensionActivationSupportsWebPageWithMaxCount

This is specifically for WebPage itself and has nothing to do with sharing the URL, you can share the whole web page content like an overlay in a web page, let's say AdBlocker. Or perhaps you have seem before like "Print" or "Translate Page".