Is it possible to have access to platform specific...
# compose-desktop
a
Is it possible to have access to platform specific APIs? What I am trying to achieve is display and hide Mac OS notifications from my jvm app. I am away of Tray notifications but that is limited as I cannot hide notifications. To my understanding there are no kotlin or jetpack compose desktop APIs for that and I would need to figure out my way through the JNI. is that right?
c
this won't just be an info.plist kind of thing would it?
a
I am not sure I understand the question @czuckie
c
like inside the .app bundle there should be an info.plist that explains what entitlements your application will have, it's not just going to be a case of removing the notifications one? I've not done desktop mac development so I can't be sure. But it's something easier to look into before you start going down a JNI bridge.
default is 'banner' apparently, maybe if you set it to none
a
https://pub.dev/packages/flutter_local_notifications this library uses the NSUserNotification APIs on macosx
a
@czuckie that is a different thing to what I am asking. You are talking about changing the style of notifications the app produces. Mine is more having control over displaying and hiding notifications from my app.
c
assuming setting the key will disable the notifications
oh my bad! I thought you just wanted no notifications :X
m
a
Why do you need a java bridge when you can use expect actual and call apple apis directly from the kotlin multiplatform project!
m
Because that only works if you're targeting kotlin/native. That might work, I don't know, but I think Compose Desktop projects are usually JVM based.
a
Makes sense
m
The Obj-C bridge has the advantage that you don't need to write native code.
But yes that approach works too