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

Bug: Generated iOS projects only support iossimulator #438

Closed
erikkerber opened this issue May 12, 2022 · 5 comments · Fixed by #507
Closed

Bug: Generated iOS projects only support iossimulator #438

erikkerber opened this issue May 12, 2022 · 5 comments · Fixed by #507
Assignees
Labels
bug Something isn't working

Comments

@erikkerber
Copy link
Contributor

erikkerber commented May 12, 2022

Describe the bug

Generated iOS apps set SUPPORTED_PLATFORMS to iphonesimulator, omitting iphoneos. This prevents debugging to an iOS device

Reproduction steps

cd examples/ios_app
bazel run :xcodeproj

CleanShot 2022-05-12 at 15 45 27@2x

Expected behavior

SUPPORTED_PLATFORMS is set to iphonesimulator iphoneos

Versions

  • Bazel: 5.1.0
  • rules_xcodeproj: b5e86b2
  • rules_apple:
  • rules_swift:

Additional context

@erikkerber erikkerber added the bug Something isn't working label May 12, 2022
@jpsim
Copy link
Contributor

jpsim commented May 12, 2022

FYI I added #285 to track device support and documented some workarounds in #285 (comment) and in the documentation in envoyproxy/envoy-mobile#2263

@erikkerber
Copy link
Contributor Author

@jpsim Was that using BwB or BwX? I should clarify this is using BwX, and it shouldn't need any additional Bazel settings to run.

@jpsim
Copy link
Contributor

jpsim commented May 12, 2022

Ultimately I'm using BwB for Envoy Mobile, but the --ios_multi_cpus=arm64 change also generated a project that could build to a device when using BwX.

That being said, it does seem to me that whenever SUPPORTED_PLATFORMS is set to iphonesimulator, we could also add iphoneos.

@erikkerber erikkerber changed the title Bug: Generated iOS projects only support iossimulator Bug: [BwX] Generated iOS projects only support iossimulator May 12, 2022
@erikkerber
Copy link
Contributor Author

OK yeah there are downstream problems if this changes, and that has to do with how the BazelDependencies files are generated.

Will leave this open until @brentleyjones returns just in case the BwX element of this that cares about that build setting is worthy of a different issue.

@brentleyjones
Copy link
Contributor

This is intended. It's the first in my list to support device in addition to simulator in a single project generation.

For now you can change your bazelrc to point to device and it will generate for device.

@brentleyjones brentleyjones changed the title Bug: [BwX] Generated iOS projects only support iossimulator Bug: Generated iOS projects only support iossimulator May 24, 2022
@brentleyjones brentleyjones self-assigned this May 24, 2022
@brentleyjones brentleyjones linked a pull request Jun 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants