Developer details the undocumented pitfalls of building a macOS screensaver in Swift
A developer who built Nap, a paid macOS screensaver collection, has published notes on the poorly documented parts of screensaver development. Apple's reference covers the API but not the runtime, and much of the existing guidance predates the sandboxed host. The author reports that a screensaver moving a small square still draws about 3 W of battery, a cost the developer's own code cannot reduce. The write-up explains how the bundle is built with swiftc and clang, and how the lifecycle methods work. It also describes a settings problem: the screensaver runs inside a sandboxed Apple host, so preferences written by an ordinary app are not visible to it, and the author worked around this by using a plain JSON file in Application Support.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in