proomt

Search

Search posts, papers, and topics

All posts

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

Related reading

  1. One App, More Than One Native Window

    Codename One now supports true native desktop windows via a new `Window` class that separates per‑surface state (paint queue, input routing, native peers) from the global `Display`. The change adds a `PaintSurface` abstraction, platform‑specific window back‑ends (AWT/Swing, Direct2D, GTK, UIWindowScene), and a migration path for components that assumed a single `Form`. Initial release has some UI…

    CodeName Onecodenameone.com11 min
  2. Native Drag and Drop Meets Cross-Device Continuity

    Codename One 8.0 adds two user‑experience primitives: **Cross‑Device Continuity** (state checkpointing + Apple Handoff + custom HTTP relay) and **Native Drag‑and‑Drop** (OS‑level drag using the same ClipboardContent model). The post shows the API (StateProvider, Continuity.checkpoint, NativeDragOperation), platform support tables, and practical advice on payload size, security, thread handling, a…

    CodeName Onecodenameone.com7 min
  3. Rootless Jailbreak Detection: Updating the Signals, Not the Claim

    The blog explains how Codename One updated its iOS jailbreak detector to handle modern rootless jailbreaks (e.g., palera1n, Dopamine). It replaces old file‑system probes with lstat checks, mount scans, and dual‑opinion API calls (libc vs raw syscall) to spot hidden bootstraps and instrumentation. It also reorders package‑manager URL‑scheme probes to prioritize Sileo, adds a background‑resume gate…

    CodeName Onecodenameone.com5 min
  4. A Dialog Can Now Be a Native Desktop Window

    Codename One now supports native desktop windows for dialogs, fixing a bug where dialogs appeared on the wrong surface in multi-window applications. This allows dialogs to participate correctly in desktop window ordering and focus, with options for global or per-instance native mode.

    CodeName Onecodenameone.com3 min