Skip to content

fix(driver): reject .ipa installs on iOS simulators with a clear error#74

Open
krismuhi wants to merge 1 commit intomainfrom
fix/driver-ipa-simulator-guard
Open

fix(driver): reject .ipa installs on iOS simulators with a clear error#74
krismuhi wants to merge 1 commit intomainfrom
fix/driver-ipa-simulator-guard

Conversation

@krismuhi
Copy link
Copy Markdown
Member

@krismuhi krismuhi commented May 2, 2026

Summary

  • Bug: device.installApp() silently accepted a .ipa path when the target was an iOS simulator, then propagated a cryptic mobilecli platform error with no actionable guidance. This hit real users whose installApps config pointed to a device-only IPA archive.
  • Fix: Added a proactive guard in installApp() — if the path ends in .ipa (case-insensitive) and the active session is an iOS simulator, throw immediately with a clear error message that names the simulator and includes step-by-step xcodebuild + zip instructions for producing a .zip of the .app bundle.
  • No behavior change for real devices or non-.ipa paths (.zip, .apk, etc.).

Test plan

  • packages/driver-mobilecli/src/driver.test.ts — 7 new unit tests covering:
    • throws on .ipa targeting iOS simulator (happy-path guard)
    • error message contains xcodebuild and zip instructions
    • case-insensitive .IPA extension match
    • no throw for .ipa on a real iOS device
    • no throw for .zip on an iOS simulator
    • no throw for .apk on an Android emulator
    • no RPC call is made when the guard fires
  • npm test passes (157 tests, 1 pre-existing skip)

Add a proactive guard in installApp(): if the path ends in .ipa and the
active session targets an iOS simulator, throw with actionable instructions
for building a .zip of the .app bundle instead of propagating a cryptic
mobilecli platform error downstream.
@krismuhi krismuhi force-pushed the fix/driver-ipa-simulator-guard branch from 6f42270 to 52e076e Compare May 3, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant