I've got an iOS action extension that should support opening images and URLs (specifically webpages). However, the action extension does not appear in the list of available extensions when sharing an image from within Safari. For example, visiting https://en.wikipedia.org and tapping the share icon will display my action extension, but visiting https://upload.wikimedia.org/wikipedia/commons/c/c4/PM5544_with_non-PAL_signals.png and tapping the share icon will not. I can also enter the Photos app and selected 1 or more images to share, which will show my action extension as an option. I first tried my Info.plist file as follows:
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>-1</integer>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>-1</integer>
</dict>
</dict>
</dict>
I would expect this to accept an unlimited number of images and URLs from all apps via the action extension in the share sheet. However, this is not the case; the action extension is not shown when tapping the share icon on an image. I have gone as far as adding all of the values for the NSExtensionActivationRule
key, as follows:
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsMovieWithMaxCount</key>
<integer>-1</integer>
<key>NSExtensionActivationSupportsFileWithMaxCount</key>
<integer>-1</integer>
<key>NSExtensionActivationSupportsAttachmentsWithMaxCount</key>
<integer>-1</integer>
<key>NSExtensionActivationSupportsWebPageWithMaxCount</key>
<integer>-1</integer>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>-1</integer>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>-1</integer>
</dict>
</dict>
</dict>
However, this still does not fix the issue. Is this something I would have to use the predicates for? If so, how and why?