Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changes/objc2-0.3.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"tauri": patch:deps
"tauri-runtime": patch:deps
"tauri-runtime-wry": patch:deps
---

On macOS, updated `objc2-*` dependencies to 0.3.2
101 changes: 58 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/tauri-runtime-wry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ percent-encoding = "2"
objc2 = "0.6"

[target.'cfg(target_os = "macos")'.dependencies]
objc2-app-kit = { version = "0.3", default-features = false, features = [
objc2-app-kit = { version = "0.3.2", default-features = false, features = [
"block2",
"NSApplication",
"NSResponder",
Expand Down
10 changes: 5 additions & 5 deletions crates/tauri-runtime-wry/src/window/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ impl super::WindowExt for tao::window::Window {
false,
)
};
unsafe { sheet.setAlphaValue(0.5) };
unsafe { ns_window.beginSheet_completionHandler(&sheet, None) };
} else if let Some(attached) = unsafe { ns_window.attachedSheet() } {
unsafe { ns_window.endSheet(&attached) };
sheet.setAlphaValue(0.5);
ns_window.beginSheet_completionHandler(&sheet, None);
} else if let Some(attached) = ns_window.attachedSheet() {
ns_window.endSheet(&attached);
}
}

fn is_enabled(&self) -> bool {
let ns_window: &NSWindow = unsafe { &*self.ns_window().cast() };
unsafe { ns_window.attachedSheet() }.is_none()
ns_window.attachedSheet().is_none()
}

fn center(&self) {
Expand Down
4 changes: 2 additions & 2 deletions crates/tauri-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jni = "0.21"

[target.'cfg(all(target_vendor = "apple", not(target_os = "macos")))'.dependencies]
objc2 = "0.6"
objc2-ui-kit = { version = "0.3.0", default-features = false, features = [
objc2-ui-kit = { version = "0.3.2", default-features = false, features = [
"UIView",
"UIResponder",
"UIScene",
Expand All @@ -61,7 +61,7 @@ objc2-ui-kit = { version = "0.3.0", default-features = false, features = [
[target."cfg(target_os = \"macos\")".dependencies]
url = "2"
objc2 = "0.6"
objc2-web-kit = { version = "0.3", default-features = false, features = [
objc2-web-kit = { version = "0.3.2", default-features = false, features = [

@Legend-Master Legend-Master Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's needed for the tauri and tauri-runtime crates, but just bumped them anyways that we have tauri-runtime-wry on 0.3.2 anyways.

Edit: yeah we need it I guess 04125a4

@sftse sftse Jul 28, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK this is a bit of a footgun in Rust. If the version is above 1.0.0 I think it's legitimate to leave out the patch number, but in 0.x.y versions I think there's less guidance on what the patch number means? In 1.x.y versions it's possible to pick a misleading minor version x and not notice it because Cargo defaults to the most recent version, so may pick 1.9.0 even if we put 1.7.0 in the Cargo.toml. People that do try to compile it with 1.7.0 can have a broken build.

Not sure if that is related to your question, but it did catch me off guard once.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"objc2-app-kit",
"WKWebView",
"WKWebViewConfiguration",
Expand Down
8 changes: 4 additions & 4 deletions crates/tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ objc2 = "0.6"
[target.'cfg(target_os = "macos")'.dependencies]
embed_plist = "1.2"
plist = "1"
objc2-foundation = { version = "0.3", default-features = false, features = [
objc2-foundation = { version = "0.3.2", default-features = false, features = [
"std",
"NSData",
"NSThread",
] }
objc2-app-kit = { version = "0.3", default-features = false, features = [
objc2-app-kit = { version = "0.3.2", default-features = false, features = [
"std",
"NSApplication",
"NSColor",
Expand All @@ -123,7 +123,7 @@ objc2-app-kit = { version = "0.3", default-features = false, features = [
"NSWindow",
"NSImage",
] }
objc2-web-kit = { version = "0.3", default-features = false, features = [
objc2-web-kit = { version = "0.3.2", default-features = false, features = [
"objc2-app-kit",
"WKWebView",
"WKWebViewConfiguration",
Expand Down Expand Up @@ -160,7 +160,7 @@ jni = "0.21"
[target.'cfg(all(target_vendor = "apple", not(target_os = "macos")))'.dependencies]
libc = "0.2"
swift-rs = "1"
objc2-ui-kit = { version = "0.3.0", default-features = false, features = [
objc2-ui-kit = { version = "0.3.2", default-features = false, features = [
"UIApplication",
"UIResponder",
"UIView",
Expand Down
10 changes: 4 additions & 6 deletions crates/tauri/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ impl<R: Runtime> AppHandle<R> {
#[cfg(target_os = "ios")]
pub fn supports_multiple_windows(&self) -> bool {
let (tx, rx) = std::sync::mpsc::channel();
let _ = self.run_on_main_thread(move || unsafe {
let _ = self.run_on_main_thread(move || {
let mtm = objc2::MainThreadMarker::new().unwrap();
let ui_application = objc2_ui_kit::UIApplication::sharedApplication(mtm);
tx.send(ui_application.supportsMultipleScenes()).unwrap();
Expand Down Expand Up @@ -1263,11 +1263,9 @@ impl<R: Runtime> App<R> {
/// Whether the application supports multiple windows.
#[cfg(target_os = "ios")]
pub fn supports_multiple_windows(&self) -> bool {
unsafe {
let mtm = objc2::MainThreadMarker::new().unwrap();
let ui_application = objc2_ui_kit::UIApplication::sharedApplication(mtm);
ui_application.supportsMultipleScenes()
}
let mtm = objc2::MainThreadMarker::new().unwrap();
let ui_application = objc2_ui_kit::UIApplication::sharedApplication(mtm);
ui_application.supportsMultipleScenes()
}

/// Sets the activation policy for the application. It is set to `NSApplicationActivationPolicyRegular` by default.
Expand Down
Loading