I can't get Action Extensions to work with selected text in safari. Inside Activation rules there is the rule to allow text, but the extension is not available when I select the text.
You need to turn on NSExtensionActivationSupportsWebURLWithMaxCount to make extension available in Safari.
When you create a non-UI action extension target from the template, an Action.js file is automatically created. Edit the file to send back the selected text using
document.getSelection().toString()
来源:https://stackoverflow.com/questions/26063582/ios-8-action-extension-for-selected-text-in-safari