Hive Hive
Sign in

visionOS UI test (.uiTests) targets are rejected at generation

GitHub issue · Open

Metadata
Source
tuist/tuist #11512
Updated
Jun 26, 2026
Details

What happened?

tuist generate fails for a .uiTests target with visionOS destinations, even though Apple supports XCUITest on visionOS. Two model gaps cause it:

  • GraphLinter.validLinks has no (.visionOS, .uiTests) entry, so lintDependency can’t find a valid link and errors out.
  • Product.forPlatform(.visionOS) returns .unitTests but never .uiTests.

Expected: visionOS UI test targets generate like iOS/tvOS/macOS do.

How do we reproduce it?

  1. In Project.swift, declare a visionOS app and a visionOS UI test target: .target(name: “App”, destinations: [.appleVision], product: .app, bundleId: “dev.tuist.App”), .target(name: “AppUITests”, destinations: [.appleVision], product: .uiTests, bundleId: “dev.tuist.AppUITests”, dependencies: [.target(name: “App”)]),
  2. Run tuist generate.
  3. Generation fails with the error below.

Error log

Target AppUITests has platform ‘visionOS’ and product ‘uiTests’ which is an invalid or not yet supported combination.

macOS version

N/A — platform-model issue, not OS-specific

Tuist version

4.200.5

Xcode version

N/A — not Xcode-specific

Comments
D
dosubot[bot] Jun 26, 2026

Hi @kikeenrique! I’m Dosu and I’m helping the Tuist team.

Your analysis is correct — both gaps are confirmed in the codebase:

  1. Product.forPlatform in Sources/XcodeGraph/Models/Product.swift — the .uiTests case only includes macOS, tvOS, and iOS, explicitly leaving out visionOS [1].

  2. GraphLinter.validLinks in Sources/TuistGenerator/Linter/GraphLinter.swift — the visionOS section has entries for .app, .unitTests, .appExtension, etc., but no LintableTarget(platform: .visionOS, product: .uiTests) entry [2].

The fix is straightforward: add platform == .visionOS to the .uiTests condition in Product.forPlatform, and add a corresponding .uiTests valid-links entry for visionOS in GraphLinter.swift (mirroring how the other platforms define their UI test dependency rules).

If you’d like to debug this further or prototype a fix, you might consider installing this skill following the steps in this repo and using a coding agent like Claude, Codex, or Amp to assist. A PR with these two changes (plus corresponding test updates) would likely be welcome.

To reply, just mention @dosu.


Share context across your team and agents. Try Dosu.

Leave Feedback Learn about tuist with Dosu Add Dosu to your team

D
dosubot[bot] Jun 26, 2026

Thanks for the quick turnaround, @kikeenrique! The PR at #11513 looks like it addresses both gaps we identified — adding the (.visionOS, .uiTests) entry to GraphLinter.validLinks and including visionOS in the .uiTests condition in Product.forPlatform. Nice work! 🎉

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about tuist Share Dosu with your team