Repository navigation
Conversation
Physical devices discovered with devicectl are offered alongside simulators in the -d device picker, grouped by iOS version, and can be selected by hardware UDID or name. Automatic (-d auto) selection is unchanged, and only considers simulators.
The development team ID is read from the organizational unit of the identity's certificate, as the suffix in an Apple Development certificate's name identifies the team member, not the team. Identities can be selected by fingerprint or name, or chosen from a list of development identities.
Run commands now have a prepare_target() hook, invoked before deciding whether the app needs to be built. On iOS, it selects the target device and, for a physical device, the development signing identity (which can be provided with -i/--identity). Physical devices use a separate binary path, and always trigger a build so that Xcode signs the app with the selected identity.
build iOS now accepts -d/--device and -i/--identity; without -d, the existing simulator build is used. Physical device builds use Xcode's automatic signing and provisioning with the selected identity's team, and target the selected device so that it can be registered if needed.
Apps are installed with devicectl, and launched with the console attached, so the app's output is streamed (with NSLog prefixes removed) until the app exits. BRIEFCASE_CONSOLE_OUTPUT is set so the app launcher can send Python output to the console, and the debugger uses the device's app packages.
Adds an iOS code signing guide covering development certificates, free Apple IDs, device pairing, Developer Mode and trusting the developer profile, and documents the -d/-i options, device deployment workflow and troubleshooting in the iOS platform reference.
A device that is paired, but isn't connected by cable or on the same network, is reported with instructions, rather than offered as a target.
A launch failure can't be distinguished from the app failing, so errors from running on a physical device point to a locked device or an untrusted developer certificate, and the deployment documentation.
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.
Adds support for running iOS apps on physical devices (iOS/iPadOS 17+) from the command line.
-d;-d auto(the default) still selects a simulator.-i/--identity). The team ID is read from the certificate, and Xcode's automatic signing manages provisioning. A free Apple ID is sufficient.devicectl, and launched with the console attached, so output, test results and Ctrl-C work as on other platforms.build iOSalso accepts-dand-i; without-d, the existing simulator build is used.Python output on a device requires beeware/briefcase-iOS-Xcode-template#94; the template revision will need to be updated once it is merged.
Fixes #860
PR Checklist:
Assisted-by: Claude Code (Claude Opus 5.5)