~/talk

Accessing native macOS API in Compose Multiplatform

Talkat droidcon Berlin 2025 · 2025-09-24..09-26· [kotlin]
slides:none on file

Shows how to get iCloud working from a Compose Multiplatform desktop app by compiling Kotlin/Native + JNI into a macOS dynamic library, exporting methods with CNAME, generating cinterop bindings, running the Gradle task linkReleaseShared and bundling/signing the lib into the app. Targets macOS ARM64 only, uploads a local database file to the app iCloud container, and works end-to-end but exposes real edge cases: container URL can be null (full account, disabled sync, offline), so error handling is required.

AI-written summary · about

  1. 0:00Native macOS APIs in Compose
  2. 1:03Why access native APIs
  3. 3:55JNI limitations for native access
  4. 8:15Kotlin Native for macOS APIs
  5. 10:04Kotlin Native benefits
  6. 14:01Generating native library bindings
  7. 18:55iCloud upload in Kotlin
  8. 24:22Exporting Kotlin functions for JNI
  9. 26:27Compose Multiplatform to JNI
  10. 28:18Building native library
  11. 30:45Loading native library at runtime
  12. 32:51Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.