From ee4b8f70249684950d4080eaf37d9d790e570126 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 31 Oct 2025 10:07:11 +0100 Subject: [PATCH 37/48] guard API --- src/osx/cocoa/utils_base.mm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/osx/cocoa/utils_base.mm b/src/osx/cocoa/utils_base.mm index 599a4fa413..74e4b78818 100644 --- a/src/osx/cocoa/utils_base.mm +++ b/src/osx/cocoa/utils_base.mm @@ -280,11 +280,16 @@ bool wxCocoaLaunch(const char* const* argv, pid_t &pid) NSRunningApplication *app = nil; - if ( [params count] > 0 ) - app = [ws openURLs:params withApplicationAtURL:url - options:NSWorkspaceLaunchAsync - configuration:[NSDictionary dictionary] - error:&error]; +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101000 + if ( WX_IS_MACOS_AVAILABLE(10, 10) ) + { + if ( [params count] > 0 ) + app = [ws openURLs:params withApplicationAtURL:url + options:NSWorkspaceLaunchAsync + configuration:[NSDictionary dictionary] + error:&error]; + } +#endif if ( app == nil ) { -- 2.24.3 (Apple Git-128)