Repository navigation
Conversation
Add ThreeLiveDemoTV (tvOS 26+), which compiles the demo's preset scenes on device and explores them with the Siri Remote: swipe on the touch surface to orbit, click the clickpad ring or arrows to step 15 degrees, Select runs onSelect on the node under a center reticle, Play/Pause resets the camera, and Menu returns to the scene list (and, from there, leaves the app as tvOS expects). The camera reuses the iOS demo's XROrbitCameraState, and Select calls XRLiveRealityKitSession.handleTap(at:in:) at the reticle, so onSelect behaviors run as they do on iOS. Auto-rotate pauses while exploring, so the model holds still under the reticle. Remote buttons are tap recognizers on the focused ARView, so Menu is consumed only while exploring, and leaving Explore puts focus back on the Explore button. The iOS and tvOS apps share one XcodeGen target template, and the iOS app's behavior is unchanged. The demo README gains an Apple TV section (requirements, controls and the UI test command). ThreeLiveDemoTVUITests drives the app with XCUIRemote: Explore, Select (miss) and Menu return focus to Explore without leaving the app; Explore holds the model still; Select on Instanced Lattice hits LatticeEnergyCore; Menu on the scene list leaves the app. CI is unchanged. Swiping on a physical Siri Remote is not covered (XCUIRemote cannot swipe).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The SwiftUI demo in
mobile/examples/ios_swiftuiis the package's only runnable host, and it is iOS-only. Building on the tvOS RealityKit layer (#108), this PR adds an Apple TV target that compiles the demo's preset scenes on device and explores them with the Siri Remote. Apple TV has no touchscreen, so the camera and selection come from the remote.Trailer (Apple TV 4K simulator, tvOS 27.0; 46 s, silent):
three-live-apple-tv-trailer.mp4
Controls
onSelecton the node under a center reticleDesign
TVContentView.swiftdrives the camera withXROrbitCameraState, as the iOS demo does, and Select callsXRLiveRealityKitSession.handleTap(at:in:)at the reticle, soonSelectbehaviors run as they do on iOS. Auto-rotate pauses while exploring, so the model holds still under the reticle.ARView, so Menu is consumed only while exploring and the app never traps the user. Leaving Explore puts focus back on the Explore button.|| os(tvOS)to their platform gates, and the app entry point showsTVContentViewon tvOS.mobile/examples/ios_swiftuiand.gitignore.ThreeLiveCapabilitiespolicy (scripts only): its bundled scenes need no network, storage, sensor or AI capability.Docs
The demo README gains a short Apple TV section (requirements, controls, simulator keys, UI test command) and its intro lists the Apple TV target;
.gitignoregains the generatedInfoTV.plist.Testing
9504393plus this commit, Xcode 27.2, Swift 6.4.2. The walkthrough, device builds and images come from an earlier revision on6b619b4plus the tvOS RealityKit commit, with the same app code (#107, merged in between, touched no Swift):build_ios_xcframework.sh(no flags) built both XCFrameworks with tvOS slices, thenxcodegen generate, theThreeLiveDemoTVscheme built for an Apple TV simulator (andThreeLiveDemofor iOS), and the Apple TV section'sxcodebuild testcommand passed (3/3, before the fourth test below was added). One snag predates this PR: step 1'snpm cifails on a fresh clone because the repo has nopackage-lock.json;npm install, as CI runs it, works and leaves the committed engine asset unchanged.main's, and CI'sThreeLiveDemoscheme is still created in a fresh checkout.xcodebuild test -scheme ThreeLiveDemoTVon tvOS 26.5 and tvOS 27.0 simulators: 4/4 pass on each.ThreeLiveDemoTVUITestsdrives the app with the simulated Siri Remote (XCUIRemote):LatticeEnergyCore.LatticeEnergyCore, Play/Pause resets the camera, Menu returns focus to Explore, and Menu on the scene list leaves the app.Apple TV 4K simulator, tvOS 27.0:
LatticeEnergyCoreAll 10 bundled presets in Explore after Play/Pause (camera reset), each compiled on device; the HUD shows its compile-and-load time:
Not covered
XCUIRemotecan't swipe.-scheme ThreeLiveDemo), so it doesn't compile the TV target. Happy to add ageneric/platform=tvOSbuild ofThreeLiveDemoTVto the Swift job if you'd like it covered.