Hi everyone, I am build a desktop app using JVM ta...
# compose-desktop
n
Hi everyone, I am build a desktop app using JVM target, can I use Mac native library inside JVM ?
k
n
Btw, JNI need C/C++ but I know only Swift :(( Anyway to convert Swift to C/C++?
s
Here's a prototype of calling into Swift from the JVM: https://forums.swift.org/t/java-interoperability-effort/74969 But any time you're getting into some sort of FFI, it's helpful to familiarize yourself with C. Usually, regardless of language, FFI between languages tends to be done over a C ABI
What's the library you intend to use? The level of difficulty here depends on the library
n
I want to access MPNowPlayingCenter
It is from Foundation
s
This? https://developer.apple.com/documentation/mediaplayer/mpnowplayinginfocenter?language=objc Looks like it's usable from Obj-C, so Rococoa is probably another option for you: https://github.com/iterate-ch/rococoa
n
@Sargun Vohra thanks, but I can not found any docs of this
s
There are links to docs in the readme
n
https://www.marcogomiero.com/posts/2025/compose-desktop-macos-api-jni/ I am trying this way, write in Kotlin (native), do you have any experience with it
Everything okey, but I can not access to UIApplication in Kotlin/Native