iOS 8 Action Extension for selected text in Safari

旧时模样 提交于 2019-12-06 15:09:25

问题


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.


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!