From 979170280b2d820c842ffb49689c045e09c10664 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Tue, 16 Jan 2024 20:52:35 -0300 Subject: [PATCH 1/2] [eas-shared] Ignore osascript error when launching on Simulator --- packages/eas-shared/src/run/ios/simulator.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/eas-shared/src/run/ios/simulator.ts b/packages/eas-shared/src/run/ios/simulator.ts index 41db1636..bc6216d9 100644 --- a/packages/eas-shared/src/run/ios/simulator.ts +++ b/packages/eas-shared/src/run/ios/simulator.ts @@ -130,7 +130,8 @@ async function waitForSimulatorAppToStartAsync( } export async function activateSimulatorWindowAsync(): Promise { - await osascript.execAsync(` + try { + await osascript.execAsync(` tell application "System Events" set assistiveAccess to UI elements enabled end tell @@ -145,6 +146,12 @@ export async function activateSimulatorWindowAsync(): Promise { end tell end if `); + } catch (error: unknown) { + // This can fail if the user hasn't enabled accessibility access. + if (error instanceof Error) { + console.warn(error.message); + } + } } async function isSimulatorAppRunningAsync(): Promise { From 3c3e4c7a7ed597f4382879ac90231a36e58c5da1 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Tue, 16 Jan 2024 21:17:18 -0300 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d36c360e..6b4bb9dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fix projects section height when the user has less than 3 projects. ([#119](https://github.com/expo/orbit/pull/119) by [@gabrieldonadel](https://github.com/gabrieldonadel)) - Fix installing apps on Android real devices. ([#123](https://github.com/expo/orbit/pull/123) by [@gabrieldonadel](https://github.com/gabrieldonadel)) - Fix Settings window size when opening it from the context menu. ([#127](https://github.com/expo/orbit/pull/127) by [@gabrieldonadel](https://github.com/gabrieldonadel)) +- Fix osascript error when launching apps on the Simulator. ([#139](https://github.com/expo/orbit/pull/139) by [@gabrieldonadel](https://github.com/gabrieldonadel)) ### 🛠 Breaking changes