Building a macOS screen saver with Kotlin
summary
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
chapters (10)
- 0:00Introduction
- 0:30What is a screen saver
- 1:52Creating a screen saver
- 2:42Swift implementation
- 7:00Installing the screen saver
- 8:26Adding more features
- 10:30Customizing images
- 13:24Fixing the problem
- 15:07Summary
- 17:06Questions
related talks
54mKotlin/Native: Answers You Won't Find on the Internet
45mCompose Multiplatform on iOS
36mBest Practices for Developing Amazing Kotlin Multiplatform Apps
32mKotlin Multiplatform in Action
42mLittle Kotlin Multiplatform Treasures
44mDeep Dive into Kotlin/Native
34mReleasing an Android, iOS, and macOS app with KMP
46mUnlocking Scalability: Power Up Your Native App with KMM
