[menu-bar][cli] Add support for physical iPhones on Windows and Linux#347
Open
gabrieldonadel wants to merge 15 commits into
Open
[menu-bar][cli] Add support for physical iPhones on Windows and Linux#347gabrieldonadel wants to merge 15 commits into
gabrieldonadel wants to merge 15 commits into
Conversation
Enable installing already-signed builds onto a USB-connected iPhone from all three desktop platforms, without requiring a paid Apple account or Xcode. The usbmux-based install transport already existed and is cross-platform; this un-gates it from macOS/Xcode and surfaces it everywhere: - eas-shared: make the developer disk image mount and app launch best-effort in runOnDevice (installation works without Xcode; launch is skipped on Windows/Linux). Discover devices via Promise.allSettled so a missing usbmux service surfaces a friendly, actionable error instead of crashing. Add a cross-platform usbmuxd availability check and per-OS helper-software guidance. - cli: guard simulator-only paths behind process.platform === 'darwin' so list-devices and install-and-launch work for physical iPhones off macOS; add an install-apple-device-support command (winget on Windows, pkexec usbmuxd on Linux). - menu-bar: add a "Show iOS devices" preference (on by default everywhere), list physical devices independently of simulators, and show an install-helper-software prompt when the Apple device service isn't reachable. - common-types: add APPLE_DEVICE_USBMUXD_NOT_RUNNING / APPLE_DEVICE_NOT_PAIRED error codes and helper guidance on the device-list error. https://claude.ai/code/session_01TeUZg8NkPKBJN2RRQfAh3o
…eference Drop the separate showIosDevices preference. The single showIosSimulators toggle now controls the whole iOS section (simulators on macOS, physical iPhones everywhere) and defaults ON / is enabled on all platforms so connected iPhones are discoverable on Windows and Linux. https://claude.ai/code/session_01TeUZg8NkPKBJN2RRQfAh3o
…returns no devices getConnectedDevicesAsync swallowed the usbmux "service not running" error on Linux/Windows: the custom path already wraps the socket error as an InternalError, but the guard only matched raw socket codes, and the native devicectl path fulfils with [] off macOS, so the error was logged and dropped. Re-throw user-facing InternalErrors from the custom path before the other guards, and add a regression test. https://claude.ai/code/session_01TeUZg8NkPKBJN2RRQfAh3o
On Linux usbmuxd is socket/udev-activated and only runs while an Apple device is attached, so an installed-but-stopped daemon previously produced the misleading "install the usbmuxd daemon" guidance. Detect the installed binary and, when present, tell the user to connect/trust the device or run `sudo systemctl start usbmuxd` instead. Adds a `startCommand` to the helper guidance, hides the menu-bar "Install" button when there's nothing to install, updates the README, and covers both states with unit tests. https://claude.ai/code/session_01TeUZg8NkPKBJN2RRQfAh3o
Instead of opening a download page and asking the user to manually install Apple's software, install the official, lightweight Apple Mobile Device Support package (USB driver + device service only, no full iTunes/Apple Devices app) via winget directly from the in-app prompt. Vendoring Apple's binaries isn't viable (proprietary, signed kernel driver), so this uses Apple's official distribution. - CLI install-apple-device-support: use winget id Apple.AppleMobileDeviceSupport with --silent; surface a clear error when winget is missing so the UI can fall back to the manual download page. - Menu-bar prompt: run the install first (winget/pkexec) and only open the download page as a fallback; refresh the device list after a successful install. - Update guidance text, README, and unit tests. https://claude.ai/code/session_01TeUZg8NkPKBJN2RRQfAh3o
On Windows/Linux first run, offer an opt-in to install the helper software needed to install apps on a physical iPhone over USB, instead of leaving users to discover it later. - check-tools CLI reports a cross-platform `appleDevice` entry (usbmux availability via validateAppleDeviceRequirementsAsync) carrying the same install guidance the popover prompt uses. - Onboarding shows an "Install apps on a physical iPhone?" section (Windows/Linux only, when the tooling is missing) reusing AppleDeviceHelperPrompt; after a successful install it re-runs the checks so the prompt clears. https://claude.ai/code/session_01TeUZg8NkPKBJN2RRQfAh3o
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
We should asupport installing apps in physical iPhones, not only in macOS but also in Windows and Linux
How
This PR adds cross-platform physical-device support by leveraging usbmux and Apple Mobile Device Service:
eas-sharednow talks to the usbmux socket on all three OSes. macOS already shipsusbmuxd; Linux activates it via socket/udev when a device is attached; Windows needs the Apple Mobile Device Service installed separately.winget install --id Apple.AppleMobileDeviceSupport, falls back to the Microsoft Store page if winget isn't available, then re-runs the checks so the row flips to a green check.Get-PnpDevicefiltered by Apple's USB vendor id05AC).Adjacent fixes:
tarextraction on Windows handles the busybox quirks that broke unpacking builds.Alertcustom onPress functionTest Plan
usbmuxdstopped, error message tells the user to start it (not to reinstall).