简体   繁体   中英

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?

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).

Since UIApplication cannot be used in this context, NSWorkspace.shared.open(<App url>) did the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM