From 5904529ba16a9c3b13512445a930e15e2d9d176d Mon Sep 17 00:00:00 2001 From: Robert Wallis Date: Sun, 20 Jul 2025 01:04:04 -0700 Subject: [PATCH] macOS: fix runtime crash on macos26 "type code 'q', but found 'Q'" Fixes #4299. --- Cargo.toml | 2 +- winit/src/changelog/unreleased.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 20af930c..b4c7d33b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,7 @@ ndk = { version = "0.9.0", features = ["rwh_06"], default-features = false } # Apple dependencies. block2 = "0.6.1" dispatch2 = { version = "0.3.0", default-features = false, features = ["std", "objc2"] } -objc2 = "0.6.1" +objc2 = { version = "0.6.1", features = ["relax-sign-encoding"] } objc2-app-kit = { version = "0.3.1", default-features = false } objc2-core-foundation = { version = "0.3.1", default-features = false } objc2-core-graphics = { version = "0.3.1", default-features = false } diff --git a/winit/src/changelog/unreleased.md b/winit/src/changelog/unreleased.md index e255263d..02f5ed6c 100644 --- a/winit/src/changelog/unreleased.md +++ b/winit/src/changelog/unreleased.md @@ -205,6 +205,8 @@ changelog entry. - Move `EventLoopExtRunOnDemand` from platform module to `winit::event_loop::run_on_demand`. - Use `NamedKey`, `Code` and `Location` from the `keyboard-types` v0.8 crate. - Deprecate `Window::set_ime_allowed`, `Window::set_ime_cursor_area`, and `Window::set_ime_purpose`. +- On macOS, use the objc2 feature `relax-sign-encoding` to fix a runtime crash #4299 + in macOS 26 with objc type checking. ### Removed