[英]how to open local app through safari web extension?
Given the allowed bidirectional communication between the JS component and the local (Mac) app, how can I open the local application using a message from the web component?鉴于 JS 组件和本地 (Mac) 应用程序之间允许的双向通信,我如何使用来自 web 组件的消息打开本地应用程序?
I am able to send messages between the components but the current safari web extensions context does not allow the usage of UIApplication.sharedApplication.openURL
(as in, UIApplication is not really loaded).我能够在组件之间发送消息,但当前的 safari web 扩展上下文不允许使用UIApplication.sharedApplication.openURL
(如 UIApplication 没有真正加载)。
Since UIApplication
cannot be used in this context, NSWorkspace.shared.open(<App url>)
did the trick.由于UIApplication
不能在这种情况下使用,因此NSWorkspace.shared.open(<App url>)
成功了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.