Can I create App Extensions on macOS in a Compose ...
# compose-desktop
s
Can I create App Extensions on macOS in a Compose app? For example, I'd like to register my app as a share extension. https://developer.apple.com/design/human-interface-guidelines/macos/extensions/share-extensions/
o
One could do that in theory, but it isn’t easy, and would require native programming.
l
Crossing my fingers for interop between Kotlin/JVM and Kotlin/Native (aka. FFI, foreign function interface), including with Android support, to appear on the roadmap in this decade. If it becomes considered, I'm wondering if it should come before or after C++ interop (which appears on the roadmap, even though marked as postponed).
4
s
@olonho gotcha. I’m open to using native APIs but I couldn’t find anything that JVM apps could use. I’ll raise an issue anyway because support for app extensions sounds essential to me for building real world apps that can interact with the platform.
A possible solution I was able to find is to create app extensions using xcode and include them under a
/PlugIns
folder when creating a package. App extensions are treated as separate apps by macOS so they may not have to be JVM apps. They can communicate with host apps using deeplinks or writing to a shared file directory. The challenge here is to find a way of including custom folders (
/PlugIns
in this case) through jpackage. Their docs has some information for doing this: https://docs.oracle.com/en/java/javase/16/jpackage/image-and-runtime-modifications.html.
👍🏼 1