Search code examples
google-chrome-extensionsafarisafari-extensionchrome-extension-manifest-v3

Safari Web Extension Manifest V3 - Don't open application window


I have a browser extension that uses manifest V3 that I'd like to publish for Safari on macOS (NOT for iOS).

I used the steps here to convert it to a Safari web extension: https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari

xcrun safari-web-extension-converter --macos-only --bundle-identifier com.my_org.extension ./build

This generated a Safari web extension XCode project. I can open the XCode project and run it, and it everything works just fine following the instructions here

However, it opens up an application in the macOS dock that says, for example:

My Org's extension is currently on. You can turn it off in Safari Extensions preferences.

I can't seem to find a way to have the extension not open up this application window.

I don't need any sort of communication between the extension and macOS, this is all strictly in-browser using service workers for background tasks.


Solution

  • In what to me is a baffling design choice, is seems like this is just the way that Safari extensions are packaged and deployed- as macOS Apps.

    There is no way to distribute a Safari extension without an accompanying app. Trying out the top extensions, most of them just have the app open up Safari's settings to enable the extension.