5

I now want to write extension for Safari. But xCode offers me first make the app, and then add the safari extension.

OK, I created an empty application, started writing my extension, but I have a question. Can I release an extension without reference to the application? I do not understand the process.

I want to just create a safari extension, without reference to a particular application, because my product is a Safari extension, not a application.

GenRiH
  • 132
  • 2
  • 11

3 Answers3

5

I know it's late but somebody else might stumble upon this topic and I think the following information can be useful.

It seems that according to Apple's documentation extensions that are created using Safari Extension Builder will not longer be supported: https://developer.apple.com/library/archive/documentation/Tools/Conceptual/SafariExtensionGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009977-CH1-SW1

Developer-signed Safari extensions are not supported in Safari 12. Safari extensions distributed in the Safari Extension Gallery are deprecated, and Safari 12 is the last release to support them. Safari by default will turn off Safari extensions using canLoad. Instead, use Content Blocker extensions. New submissions to the Safari Extensions Gallery will be accepted until the end of 2018.

So the only way seems to be to

Use Safari app extensions to add features to the Safari browser.

https://developer.apple.com/documentation/safariservices/safari_app_extensions: this looks like the only way to develop an extension as of today (2018), alas.

Kirlat
  • 175
  • 5
  • 11
1

There are 2 types of Safari extensions: ones that bundled with a Mac app (Safari App Extensions) and standalone extensions. I belive standalone extensions can be created using Safari Extension Builder (avaliable in Develop menu in Safari), without Xcode. You can learn more about Safari extensions here.

Igor R.
  • 399
  • 4
  • 23
0

As Safari extension Builder is deprecated, you now use Xcode. Simply, a Safari Extension can either be bundled with an app, or standalone. To start a new standalone extension, that is, not part of a desktop app:

  1. Launch Xcode
  2. Choose File > New > Project
  3. Select the template Safari Extension App in the Other section
  4. Click Next (continue through the normal process to develop your Safari Extension)

Alternatively, if you wanted to add a Safari Extension to your existing project:

  1. Launch Xcode
  2. Open your existing app project
  3. Choose File > New > Target
  4. Select the template Safari Extension App in the Other section
  5. Click Next (continue through the normal process to develop your app including Safari Extension)

An example might be Grammarly whereby you can download a desktop client and Safari extension (in a bundle) for macOS, or you may download the extension as a standalone app from App Store.

TimD
  • 462
  • 6
  • 18
  • And that's the idiotic thing. To release an extension you need a useless app to bundle it in. Simply check the current Safari extensions and name ONE that does not include an app that is useless. Oh yeah, the one stand alone app that includes an extension is now listed as an actual safari extension. – Julian F. Weinert Dec 13 '20 at 07:42
  • Really, the app or extension *is* the bundle – TimD Dec 15 '20 at 04:13