"Tauri's API covers the common 95%. For the last 5%, it hands you the keys to the OS itself instead of locking the door."
When the Cross-Platform API Isn't Enough
Tauri's window API is deliberately cross-platform, which means it can't expose every OS-specific quirk. Sometimes you need to call the native windowing layer directly: AppKit/Cocoa on macOS (via the objc2 crates), the Win32 API on Windows (via windows-rs), GTK on Linux. Tauri doesn't trap you in its abstraction — you can reach the underlying handle and talk to the OS. That escape hatch is what makes Tauri viable for serious native apps.
The Cinder Case: Frontmost Activation
Recall the macOS focus bug from the scaffold track — the dev binary that took clicks but not keystrokes, and the cousin problem where an always-on-top floating window wouldn't become the key window. macOS only delivers keyboard events to the key window, and a process that isn't a properly-activated foreground app may never get one. Tauri's set_focus() alone didn't fix it. The real fix dropped to Cocoa: promote the process with set_activation_policy(Regular), then call NSApplication.activate() directly through objc2.
Gate It, Pin It, Comment It
Native code is platform-specific, so it must live behind #[cfg(target_os = "macos")] — the other platforms compile clean without it. The objc2 crates are versioned (Cinder pins objc2-app-kit and objc2-foundation), and because this kind of code is non-obvious to the next reader, comment why it exists. Native escape hatches are powerful and easy to misuse; treat them as load-bearing and document the bug they solve.