Search code examples
cocoasafari-extensionmac-app-storesandbox

Mac App Store app with Safari Extension


I'm trying to understand how an app like 1Password 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.


Solution

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