Skip to content

fix: add --platforms flag for correct Apple SDK resolution#4

Merged
maatheusgois-dd merged 1 commit into
mainfrom
maatheusgois-dd/fix-platform-sdk-resolution
May 19, 2026
Merged

fix: add --platforms flag for correct Apple SDK resolution#4
maatheusgois-dd merged 1 commit into
mainfrom
maatheusgois-dd/fix-platform-sdk-resolution

Conversation

@maatheusgois-dd

Copy link
Copy Markdown
Contributor

Summary

swift_library targets were compiling against macOS SDK instead of iOS Simulator SDK when using bazel_ios_build with platform: "simulator". This is because --ios_multi_cpus=sim_arm64 alone doesn't force a platform transition for standalone library targets — it only affects the CPU split for rules that already transition to iOS (like ios_application).

Fix: Add --platforms=@build_bazel_apple_support//platforms:ios_sim_arm64 (and equivalents for all other platforms) which forces Bazel's top-level platform resolution to the correct Apple SDK. The legacy --ios_multi_cpus flag is kept alongside for backward compatibility with rules_apple transition logic.

Also: Exposes all platform options (macos, tvos, watchos, visionos) in the bazel_ios_build tool schema — they were already supported internally but not advertised to MCP clients.

Test plan

  • All 430 unit tests pass
  • Verified locally: bazel build --platforms=@build_bazel_apple_support//platforms:ios_sim_arm64 --ios_multi_cpus=sim_arm64 //Packages/DebugTools:DebugToolsCore succeeds (previously failed with CADisplayLink unavailable in macOS)

Made with Cursor

swift_library targets were compiling against macOS SDK instead of iOS
because --ios_multi_cpus alone doesn't force a platform transition.
Adding --platforms=@build_bazel_apple_support//platforms:... ensures
the correct SDK is always used regardless of target rule type.

Also exposes all platform options (macos, tvos, watchos, visionos) in
the bazel_ios_build tool schema.

Generated-by: Cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
@maatheusgois-dd maatheusgois-dd self-assigned this May 19, 2026
@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@maatheusgois-dd
maatheusgois-dd marked this pull request as ready for review May 19, 2026 20:56
@maatheusgois-dd
maatheusgois-dd merged commit a1c1e84 into main May 19, 2026
7 checks passed
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.

1 participant