diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88f0b7a..55e8e7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -140,6 +140,9 @@ jobs: shared-key: release-macos-arm64 - name: Build release + # Keep in step with LSMinimumSystemVersion in packaging/macos/Info.plist. + env: + MACOSX_DEPLOYMENT_TARGET: "14.0" run: cargo build --locked --release - name: Package app (.dmg, unsigned) diff --git a/Cargo.lock b/Cargo.lock index 464d346..a083e7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2710,7 +2710,7 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" [[package]] name = "local-dev-proxy" -version = "0.0.19" +version = "0.0.20" dependencies = [ "block2 0.6.2", "bytes", diff --git a/Cargo.toml b/Cargo.toml index b58a3c8..6a84183 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "local-dev-proxy" -version = "0.0.19" +version = "0.0.20" edition = "2024" description = "Local development process orchestration with a built-in reverse proxy" authors = ["Andrew Chen "] @@ -36,8 +36,8 @@ windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_System_ [target.'cfg(target_os = "macos")'.dependencies] objc2 = "0.6.4" -objc2-app-kit = { version = "0.3.2", default-features = false, features = ["std", "NSApplication", "NSResponder"] } -objc2-foundation = { version = "0.3.2", default-features = false, features = ["std", "block2", "NSNotification", "NSOperation", "NSString"] } +objc2-app-kit = { version = "0.3.2", default-features = false, features = ["std", "NSApplication", "NSResponder", "NSWindow"] } +objc2-foundation = { version = "0.3.2", default-features = false, features = ["std", "block2", "NSArray", "NSNotification", "NSOperation", "NSString"] } block2 = "0.6.2" [dev-dependencies] diff --git a/packaging/macos/Info.plist b/packaging/macos/Info.plist index 1cd64a1..ffbdb0f 100644 --- a/packaging/macos/Info.plist +++ b/packaging/macos/Info.plist @@ -25,6 +25,6 @@ NSHighResolutionCapable LSMinimumSystemVersion - 11.0 + 14.0 diff --git a/src/desktop.rs b/src/desktop.rs index 7c3b44b..cbff7e4 100644 --- a/src/desktop.rs +++ b/src/desktop.rs @@ -766,9 +766,14 @@ mod dock { NSApplicationActivationPolicy::Accessory }); if visible { - // `activate` needs macOS 14; this covers older releases too. - #[allow(deprecated)] - app.activateIgnoringOtherApps(true); + // `activate` only requests activation, which macOS refuses while + // another app is in use; raise the window so it is seen regardless. + app.activate(); + for window in app.windows().iter() { + if window.canBecomeMainWindow() { + window.orderFrontRegardless(); + } + } } }