Skip to content

Add support for running iOS apps on physical devices - #3114

Open
kattni wants to merge 9 commits into
beeware:mainfrom
kattni:860-ios-device-deployment
Open

kattni wants to merge 9 commits into
beeware:mainfrom
kattni:860-ios-device-deployment

Conversation

@kattni

@kattni kattni commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Adds support for running iOS apps on physical devices (iOS/iPadOS 17+) from the command line.

  • Connected devices are listed alongside simulators when using -d; -d auto (the default) still selects a simulator.
  • When a device is selected, a development signing identity is selected (or provided with -i/--identity). The team ID is read from the certificate, and Xcode's automatic signing manages provisioning. A free Apple ID is sufficient.
  • Apps are built for the device, installed with devicectl, and launched with the console attached, so output, test results and Ctrl-C work as on other platforms.
  • build iOS also accepts -d and -i; without -d, the existing simulator build is used.
  • Adds an iOS code signing guide, and updates the iOS platform reference.

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:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool

Assisted-by: Claude Code (Claude Opus 5.5)

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.
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.

Add ability to run iOS app on a physical device

1 participant