~/lightning

Building a macOS screen saver with Kotlin

Lightningat AndroidMakers by droidcon 2025 · on Thursday, 2025-04-10· at 11:15· [kotlin]
slides:none on file

Builds a native macOS screen saver in Kotlin by exporting a Kotlin/Native XCFramework from a Kotlin Multiplatform project targeting macOS ARM and x86, calling AppKit and NSBundle APIs to load assets and place animated NSImageViews, producing a .saver installer. Hits include a seven‑step rebuild/invalidate dance, migrating NSUserDefaults to the useless screen saver defaults, and a Sonoma bug that leaves legacy screen saver processes alive causing 100% CPU and hundreds of MB RAM unless the process is terminated. Also shows a working Compose renderer.

AI-written summary · about

  1. 0:00Introduction
  2. 0:30What is a screen saver
  3. 1:52Creating a screen saver
  4. 2:42Swift implementation
  5. 7:00Installing the screen saver
  6. 8:26Adding more features
  7. 10:30Customizing images
  8. 13:24Fixing the problem
  9. 15:07Summary
  10. 17:06Questions
~/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.