From 2659441025dab9bc9bfa8bde1268ab37aa99d325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Rouleau?= Date: Sat, 10 Oct 2026 03:04:05 -0400 Subject: [PATCH] tvos: send log messages to NSLog, as on iOS `__private_api_log_lit` sent messages to `NSLog` only for `target_os = "ios"`. tvOS fell through to the desktop path, which prints with `eprintln!`, and an app on an Apple TV has no terminal: its standard error only shows with Xcode's debugger attached. So `warn!`, `error!` and the other `log-impl` macros never reached the system log, where Console and `log stream` read it. tvOS now takes the iOS path, like the rest of the iOS code it already shares. Co-Authored-By: Claude Opus 5.5 --- src/log.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/log.rs b/src/log.rs index 429df2995..bc3cdf385 100644 --- a/src/log.rs +++ b/src/log.rs @@ -178,7 +178,12 @@ macro_rules! __log_line { }; } -#[cfg(not(any(target_arch = "wasm32", target_os = "android", target_os = "ios")))] +#[cfg(not(any( + target_arch = "wasm32", + target_os = "android", + target_os = "ios", + target_os = "tvos" +)))] pub fn __private_api_log_lit( message: &str, _level: Level, @@ -228,7 +233,7 @@ pub fn __private_api_log_lit( unsafe { log_fn(msg.as_ptr()) }; } -#[cfg(target_os = "ios")] +#[cfg(any(target_os = "ios", target_os = "tvos"))] pub fn __private_api_log_lit( message: &str, _level: Level,