开发者

Mac App Store app with Safari Extension

I'm trying to understand how an app like 1Passw开发者_StackOverflow社区ord can be on the Mac App Store and come with a Safari extension (and most importantly, how can the extension communicate with the app) because I'd like to do the same. Is the native app running a server as a subprocess that get's called by the safari extension?

I'd like to know if it's possible to do that and still be Mac App Store + Sandboxing friendly.


1Password uses an agent to communicate between the Mac App and the Safari Extension. The agent is most likely a small server process that can receive RESTful calls from the extension(s). This mechanism allows the synchronization between all the different extensions (Safari, Chrome, Firefox, etc), the client and the main database.

The Safari extension is no longer installed directly by the 1Password app, by the way. Instead, you are directed to a web page that contains the Safari extension download, thus making the App sandbox-friendly.


I believe it's a regular .app that has a Safari extension inside it as a resource.

The app will check for the existence of the Safari extension on application launch, and if it doesn't find it in the default locations it will prompt the user to install it. If the users chooses to install it, the app copies the extensions to the Safari extensions folder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜