CodeName OneShai Almog3 min readintermediate
A Mac App, Not an iOS App on a Mac
Summary
Codename One switched its default Mac build from iOS‑Catalyst to a native AppKit port. The new path creates true NSApplication/NSWindow objects with per‑window CAMetalLayer rendering, native menus, text input, multi‑monitor support and accessibility, eliminating the costly image‑copy pipeline of Catalyst and enabling proper desktop window behavior.
- Catalyst rendered each window into a mutable BGRA image (~33 MiB for 4K) and copied it into the scene, causing high memory and CPU overhead.
- AppKit uses a native NSWindow per Codename One window with its own CAMetalLayer, reducing copies and allowing dirty‑region clipping per window.
- Full desktop window features are now supported: always‑on‑top, utility windows, minimize/maximize, modality, undecorated windows, native menus (NSMenu), and proper NSTextInputClient handling.
- Multi‑monitor support and screen scaling are derived from NSScreen, improving DPI handling.
Eliminating the Catalyst bridge removes a major performance bottleneck for multi‑window desktop apps and provides true native macOS UX (menus, window management, accessibility). This is critical for productivity tools, trading terminals, and any app that relies on precise desktop interactions.
6/10