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

Add --ios_device flag for running iOS application on a physical device #23599

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CognitiveDisson
Copy link

Related to this PR in the rules_apple.

In Xcode 15, Apple introduced a new command-line tool that allows management of physical devices. This makes it possible to install and launch *_application targets on a physical device without third-party solutions.
It would be nice to have a Bazel flag to pass a device identifier for this.

@keith
Copy link
Member

keith commented Sep 11, 2024

FYI I think it's unlikely that folks would accept a new iOS specific flag into bazel itself, there's a goal of removing this type of specifics from bazel. If a flag is required it would probably be preferred to add a starlark flag in rules_apple itself

@CognitiveDisson
Copy link
Author

CognitiveDisson commented Sep 11, 2024

FYI I think it's unlikely that folks would accept a new iOS specific flag into bazel itself, there's a goal of removing this type of specifics from bazel. If a flag is required it would probably be preferred to add a starlark flag in rules_apple itself

Thanks for letting me know. I had the same assumption, but I'm curious to hear what folks will say.

@keith
Copy link
Member

keith commented Sep 11, 2024

note that it will not get any attention from folks who can merge unless you mark ready for review

@CognitiveDisson CognitiveDisson marked this pull request as ready for review September 12, 2024 12:37
@github-actions github-actions bot added team-Rules-ObjC Issues for Objective-C maintainers awaiting-review PR is awaiting review from an assigned reviewer labels Sep 12, 2024
luispadron added a commit to bazelbuild/rules_apple that referenced this pull request Sep 14, 2024
…al device (#2527)

In Xcode 15, Apple introduced a new command-line tool that allows
management of physical devices. This makes it possible to install and
launch *_application targets on a physical device without third-party
solutions.

With these changes, you can now use `bazel run //:iOSApp
--ios_multi_cpus=arm64`.

Previously, this command would attempt to launch the application on a
simulator and fail due to an invalid architecture.

Bazel currently lacks a specific flag for specifying device identifiers
suitable for this purpose. I created a [PR to
Bazel](bazelbuild/bazel#23599) introducing an
`--ios_device` flag. However, it's unlikely to be accepted since it's a
platform-specific flag. If it is accepted, we can utilize it in the
future.

For the current implementation, I added astring_flagthat allows passing
a device identifier. It can be used like
this:--@build_bazel_rules_apple//apple/build_settings:ios_device=<uuid|ecid|serial_number|udid|name|dns_name&gt;
.
---------

Signed-off-by: Vadim Smal <[email protected]>
Co-authored-by: Luis Padron <[email protected]>
Co-authored-by: Brentley Jones <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review PR is awaiting review from an assigned reviewer team-Rules-ObjC Issues for Objective-C maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants