From c0567b256cf933d8a5316a47152689e40b01bb3e Mon Sep 17 00:00:00 2001 From: Vivian Vijay Ludrick <116781909+vivianludrick@users.noreply.github.com> Date: Tue, 18 Aug 2026 11:49:53 +0530 Subject: [PATCH] LOC-7291: download darwin-arm64 binary on Apple Silicon On macOS the binding now selects BrowserStackLocal-darwin-arm64 when the runtime reports arm64/aarch64; x64 runtimes (including x64-under-Rosetta) keep BrowserStackLocal-darwin-x64, preserving current behavior. Co-Authored-By: Claude Fable 5 --- lib/LocalBinary.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/LocalBinary.php b/lib/LocalBinary.php index 5c6121a..eacac41 100644 --- a/lib/LocalBinary.php +++ b/lib/LocalBinary.php @@ -53,8 +53,11 @@ private function server_home() { } private function platform_url(){ - if (PHP_OS == "Darwin") + if (PHP_OS == "Darwin") { + if (in_array(php_uname('m'), array('arm64', 'aarch64'))) + return 'https://s3.amazonaws.com/browserStack/browserstack-local/BrowserStackLocal-darwin-arm64'; return 'https://s3.amazonaws.com/browserStack/browserstack-local/BrowserStackLocal-darwin-x64'; + } else if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') return 'https://s3.amazonaws.com/browserStack/browserstack-local/BrowserStackLocal.exe'; if ((strtoupper(PHP_OS)) == "LINUX") {