From 6d674638c30a0ccbe59d0ade2346c6e7a45f8296 Mon Sep 17 00:00:00 2001 From: Vivian Vijay Ludrick <116781909+vivianludrick@users.noreply.github.com> Date: Tue, 18 Aug 2026 11:40:49 +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 (same runtime-arch detection the linux-arm64 path already uses); x64 runtimes (including x64-under-Rosetta) keep BrowserStackLocal-darwin-x64, preserving current behavior. Co-Authored-By: Claude Fable 5 --- browserstack/local_binary.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/browserstack/local_binary.py b/browserstack/local_binary.py index 2fa7398..1e756b7 100644 --- a/browserstack/local_binary.py +++ b/browserstack/local_binary.py @@ -21,7 +21,10 @@ def __init__(self, key, error_object=None): source_url = self.fetch_source_url() + '/' if osname == 'Darwin': - self.http_path = source_url + "BrowserStackLocal-darwin-x64" + if platform.machine() in ('arm64', 'aarch64'): + self.http_path = source_url + "BrowserStackLocal-darwin-arm64" + else: + self.http_path = source_url + "BrowserStackLocal-darwin-x64" elif osname == 'Linux': if self.is_alpine(): self.http_path = source_url + "BrowserStackLocal-alpine"