Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eas-shared] Ignore osascript error when launching on Simulator #139

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/eas-shared/src/run/ios/simulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ async function waitForSimulatorAppToStartAsync(
}

export async function activateSimulatorWindowAsync(): Promise<void> {
await osascript.execAsync(`
try {
await osascript.execAsync(`
tell application "System Events"
set assistiveAccess to UI elements enabled
end tell
Expand All @@ -145,6 +146,12 @@ export async function activateSimulatorWindowAsync(): Promise<void> {
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<boolean> {
Expand Down
Loading