Skip to content

build(visionos): build for the visionOS Simulator with the public SDK - #1172

Merged
Kyle-Ye merged 6 commits into
mainfrom
optimize/visionos
Oct 17, 2026
Merged

Kyle-Ye merged 6 commits into
mainfrom
optimize/visionos

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Oct 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Builds for the visionOS Simulator with the public SDK. A UIKit header overlay from DarwinPrivateFrameworks enables UIScreen, UIWindow.screen, and UIDevice.orientation, so visionOS compiles the same UIKit hosting code as iOS.
  • Removes the OPENSWIFTUI_INTERNAL_XR_SDK flag and its conditional code, including the fixed visionOS contents scale and the skipped keyboard frame conversion.
  • Limits CoreSVG, SFSymbols, and Gestures to iOS and macOS, because their frameworks have no visionOS slices.
  • Fixes visionOS compile and link issues in accessibility settings, sensory feedback, hover effect availability, and SDK 26 detection.
  • Adds a visionOS Simulator build job to CI and shows its status in the README.
  • Updates DarwinPrivateFrameworks to the revision that provides the overlay script.

Closes #1156. Part of #1171.

Dependency

Link CoreServices and libAccessibility on visionOS and stub
_AXSHoverTextEnabled, which visionOS libAccessibility does not export.
Keep the UIKit sensory feedback cache and generators on iOS; visionOS
shares the empty feedback context. Add OpenSwiftUI_v6_0 availability
to the hover effect content types, enable the SDK 26 additions on
visionOS in OpenSwiftUIBase.h, and skip system module indexing on
visionOS. HostingExample disables foreground vibrancy on visionOS until
foreground material rendering is implemented.
CoreSVG, SFSymbols, and Gestures xcframeworks have no visionOS slices.
Make their product dependencies and Swift defines iOS and macOS only,
following the FeatureFlags pattern, so a visionOS build needs no
OPENSWIFTUI_LINK_* environment. Remove the unused valued C define for
CoreSVG.
The public visionOS Simulator SDK marks UIScreen and UIWindow.screen
unavailable. Read the UIKit header overlay generated by
DarwinPrivateFrameworks/Scripts/XR/install_xr_uikit_overlay.sh with
-vfsoverlay and -ivfsoverlay on visionOS (OPENSWIFTUI_XR_OVERLAY, default
~/Library/Developer/OpenSwiftUI/XRSimulator/overlay.yaml), so visionOS
compiles the same UIScreen code as iOS. Remove OPENSWIFTUI_INTERNAL_XR_SDK
and its gates, the hard-coded visionOS contents scale, and the skipped
keyboard frame conversion. Add the matching build settings to the Example
project and document the visionOS Simulator build.
Build the OpenSwiftUI scheme for generic/platform=visionOS Simulator on
runners labeled xcode-26.6 and visionos-simulator-2.5. The job generates
the UIKit header overlay from the pinned DarwinPrivateFrameworks checkout
and verifies that a visionOS Simulator destination is available.
Show the visionOS CI badge in the platform table. State that CI builds
the visionOS Simulator without running tests, that the build needs the
UIKit header overlay, and that visionOS device builds are not supported.
Pin DarwinPrivateFrameworks to b73f4d8, which adds the visionOS Simulator UIKit header overlay script used by the visionOS build.
@github-actions github-actions Bot added area: hosting-bridge SwiftUI bridge, UIHosting/NSHosting, representables, and platform host views. area: tooling Developer tooling, package manifests, Tuist, scripts, formatting, or release tooling. platform: visionOS visionOS-specific behavior or support. type: build Build system, packaging, toolchain, release, or compiler support. labels Oct 17, 2026
@tuist

tuist Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
Unknown ⏳ 7 63fb0ebbb
OpenSwiftUI ✅ 7 63fb0ebbb

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 51.0s 63fb0ebbb

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 29.45%. Comparing base (fa18840) to head (5b3f0eb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1172      +/-   ##
==========================================
+ Coverage   29.42%   29.45%   +0.03%     
==========================================
  Files         943      943              
  Lines       74695    74695              
==========================================
+ Hits        21979    22004      +25     
+ Misses      52716    52691      -25     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye
Kyle-Ye merged commit 1f04a1d into main Oct 17, 2026
7 checks passed
@Kyle-Ye
Kyle-Ye deleted the optimize/visionos branch October 17, 2026 17:35
@Kyle-Ye Kyle-Ye added this to the 0.24.0 milestone Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: hosting-bridge SwiftUI bridge, UIHosting/NSHosting, representables, and platform host views. area: tooling Developer tooling, package manifests, Tuist, scripts, formatting, or release tooling. platform: visionOS visionOS-specific behavior or support. type: build Build system, packaging, toolchain, release, or compiler support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add visionOS Simulator build and CI support

1 participant