Can an ExtensionFoundation-based extension on macOS have its own extension point and host its own extensions?

It is possible for an extension to an app (based on ExtensionFoundation) to declare its own extension point and host its own ExtensionFoundation extensions?

Based on the documentation, I am guessing the answer is no, but worth double-checking.

What would be the reason to prevent this? Every ExtensionFoundation extension runs in its own process, and may have need to be extended safely just as its host app does.

Thank you!

Answered by DTS Engineer in 905615022

Lemme confirm that I’m parsing your question correctly:

  • There is a host app.
  • Which supports its own extension point.
  • You’re building an extension for that extension point.
  • And you want to host your own extension point within your extension.
  • So that other developers can build their own extensions for your extension.

Did I get that right?

If so, then, yeah, there’s no way to do that.

What would be the reason to prevent this?

I don’t think it’s a question of preventing it, but rather of not enabling it. When you design a plug-in system, or indeed any API, you generally want to constrain things as much as possible, partly for security reasons but mainly because every bit of flexibility you add has to be maintained in the long term.

But if you have a specific use case that needs this, I recommend that you file an enhancement request outlining your requirements. And if you do that, please post your bug number, just for the record.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

Lemme confirm that I’m parsing your question correctly:

  • There is a host app.
  • Which supports its own extension point.
  • You’re building an extension for that extension point.
  • And you want to host your own extension point within your extension.
  • So that other developers can build their own extensions for your extension.

Did I get that right?

If so, then, yeah, there’s no way to do that.

What would be the reason to prevent this?

I don’t think it’s a question of preventing it, but rather of not enabling it. When you design a plug-in system, or indeed any API, you generally want to constrain things as much as possible, partly for security reasons but mainly because every bit of flexibility you add has to be maintained in the long term.

But if you have a specific use case that needs this, I recommend that you file an enhancement request outlining your requirements. And if you do that, please post your bug number, just for the record.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks Quinn, I'll file that enhancement request next.

The scenario I painted is the following: our visual effects are hosted as an FxPlug (PlugInKit) in Final Cut Pro, Motion and Compressor – I presume maybe incorrectly that PlugInKit is sitting on top of ExtensionKit, but it is certainly based on NSXPC so our plugin sits outside Apple’s video apps.

Our visual effects are based on FxCore (https://fxfactory.com/info/fxcore/), a replacement for Quartz Composer. Just like QC, it is an application and framework combo, with its own plugin SDK waiting to be made public. I wanted to use FoundationExtension/Kit because it seems like a better idea than loading random bundles in my own address space. Hopefully in the future!

Thanks for sharing the background to your request.

I presume maybe incorrectly that PlugInKit is sitting on top of ExtensionKit

Not really. PluginKit predates ExtensionKit by many years. It’s the infrastructure that underlies the original NSExtension based app extensions. ExtensionKit is kinda like version 2 of that idea, being both more modern and more capable.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Can an ExtensionFoundation-based extension on macOS have its own extension point and host its own extensions?
 
 
Q