Skip to content

Feature Request: Add visionOS (Vision Pro) platform support #161

Closed as not planned

Description

@jihongboo

Feature Request / Proposal

Hi @superuser404notfound,

Thank you for building AetherEngine!

Currently, AetherEngine supports iOS (16.0+), tvOS (16.0+), and macOS (14.0+). It would be awesome to see official support for visionOS (Vision Pro) added to the package targets and build configurations.

Target Platforms

  • visionOS 1.0+ (or 2.0+)

Motivation

With Apple Vision Pro being a great target platform for media playback and spatial/personal theater experiences, having AetherEngine support visionOS natively will enable developers to bring high-performance playback to visionOS apps seamlessly.

Thanks for considering this feature request!

Activity

  1. superuser404notfound commented on Jul 29, 2026

    @superuser404notfound
    Owner

    Thanks for the kind words, and sorry this sat unanswered for a while.

    Short version: I want this, and it is not close. The blocker is below AetherEngine rather than in it.

    The binary dependencies have no visionOS slices. The engine is built on prebuilt xcframeworks, and Libavformat.xcframework currently ships ios-arm64, ios-arm64_x86_64-simulator, tvos-arm64, tvos-arm64_x86_64-simulator and macos-arm64_x86_64. No xros, no xros-simulator. Adding .visionOS(...) to Package.swift would resolve and then fail to link, so the real work is in FFmpegBuild: a full cross-compile of FFmpeg plus dav1d and zvbi for two new triples, with the same LGPL dynamic-framework packaging the other platforms use. That is the bulk of it and it is mechanical, but it is not a small build.

    LibDovi is the awkward one. It is Rust, and aarch64-apple-visionos is a Tier 3 target, so it needs a nightly toolchain and -Z build-std rather than a plain cargo build. Dolby Vision would otherwise have to be compiled out for visionOS, which I would rather not ship as a silent capability gap.

    The Swift side looks reasonable by comparison. There are 64 platform guards in the engine, 35 of them already #if os(tvOS) || os(iOS), which is the shape that mostly wants a visionOS arm too. The display-criteria layer (AVDisplayManager, preferredDisplayCriteria) is tvOS-only and already guarded, and visionOS has no equivalent HDMI-mode handshake, so that whole path stays compiled out and the criteria-free routing the iOS path already uses applies. AVPlayer, VideoToolbox and the loopback server are all present on visionOS, so the core pipeline is not the problem.

    What I am not going to do is add the platform to the manifest and call it supported. A build that resolves but cannot decode is worse than an honest "not yet". If you (or anyone reading) want to push on this, the highest-leverage contribution by far is the FFmpegBuild side: xros and xros-simulator slices produced by the existing build.sh recipe. Once those exist and link, I can do the engine pass and find out what actually breaks, which is the part I can only learn by running it.

    Leaving this open as the tracking issue for visionOS support.

  2. superuser404notfound commented on Jul 29, 2026

    @superuser404notfound
    Owner

    Correction to my previous comment: I had the Rust situation wrong, and it makes this more approachable than I described.

    aarch64-apple-visionos and aarch64-apple-visionos-sim are Tier 2 without host tools on stable, with full std available through rustup target add. They were Tier 3 at one point, which is what I was going on, but they are not now. So LibDovi needs no nightly toolchain and no -Z build-std: its build script already builds aarch64-apple-tvos the same way, and the visionOS slices are two more lines of the same shape. Dolby Vision does not have to be compiled out.

    Having actually looked instead of estimating, the rest is more mechanical than I implied:

    • The visionOS SDKs are present in current Xcode (xros, xrsimulator), and both compile a plain C translation unit for arm64-apple-xros and arm64-apple-xros-simulator without complaint, so the toolchain side is not in question.
    • FFmpegBuild's build.sh is table-driven. Each library (FFmpeg, dav1d, zimg, zvbi) has one line per slice, plus one case arm mapping the platform to its SUPPORTED_PLATFORM / minimum-OS pair and one make_framework call. Adding visionOS is roughly a dozen lines of the same shape as the tvOS ones, not a new build system.
    • On the engine side, 35 of the 64 platform guards are already #if os(tvOS) || os(iOS), which is the shape that wants a visionOS arm. os(visionOS) is its own platform in Swift and is not implied by os(iOS), so those are explicit edits rather than something that comes for free. The tvOS-only display-criteria layer stays compiled out, which is correct: visionOS has no HDMI mode handshake, so the criteria-free routing the iOS path already uses applies.

    What I still cannot claim is that it builds. Cross-compiling FFmpeg, dav1d's meson cross file and zvbi's rather old autotools to a platform none of them list is exactly where this kind of work goes sideways, and every past platform gap here surfaced at link or run time rather than in the plan. So: no longer "the blocker is below the engine and it is large", but "the pieces all exist and someone has to run them and fix what falls out".

    Still leaving this open as the tracking issue. If it lands, it lands as a real supported platform with the same build and test coverage as the others, not as a manifest entry.

  3. superuser404notfound commented on Jul 29, 2026

    @superuser404notfound
    Owner

    Shipped in 6.0.0.

    visionOS is a declared platform now, and the engine builds for both device and simulator. The dependency chain went first: FFmpegBuild 2.4.0 and LibDovi 1.1.0 carry the xros device and simulator slices.

    It turned out to be less work than my first answer suggested, and the surprises were not where I expected them.

    The FFmpeg side needed one patch. libavcodec/videotoolbox.c selects kCVPixelBufferOpenGLESCompatibilityKey under #if TARGET_OS_IPHONE, which is 1 on visionOS (TARGET_OS_IOS is the one that is 0), and the key is unavailable there because the platform has neither OpenGL ES nor OpenGL. Taking it out of the visionOS branch costs nothing: the attribute only asks CoreVideo to make the buffer bindable as a GL texture, and on visionOS every consumer is Metal, which the IOSurface properties set alongside it already cover. Everything I had expected to fight with, dav1d's meson cross build, zvbi's rather old autotools, FFmpeg's own configure, cross-compiled to xros untouched.

    Dolby Vision is in. That was the part I got wrong earlier and corrected above: the Rust targets are tier 2 with prebuilt std on stable, so LibDovi needed no source or build changes at all, just two more slice rows.

    The FFmpeg slice is feature-identical to the tvOS one, verified by diffing the generated codec, demuxer, filter and parser lists rather than by assertion: 39 decoders, 24 demuxers, 13 filters, 19 parsers, byte-identical sets. So HDR10+, Atmos bridging, dav1d, teletext and the sidecar demuxers are all present, not trimmed for the new platform.

    On the engine side three sites needed the platform added: the AV1 supplemental-decoder registration (a platform absent from #available counts as available, so visionOS reached an API introduced in 26.2), the AirPlay observation (isExternalPlaybackActive is unavailable, and visionOS has no receiver to hand a stream to, so that whole path is compiled out), and the sample-buffer renderer (no display-sleep timer, and preferredDynamicRange arrives in 26.0). The tvOS-only display-criteria layer needed nothing, since there is no HDMI mode handshake to drive.

    What is not verified is playback on real hardware. I have no Vision Pro, and the simulator has no real VideoToolbox to speak of, so this release is "it builds and every codec path is compiled in", not "it has been watched". If you get a chance to run it there, a report either way would be genuinely useful, particularly whether the native AVPlayer path renders at all and whether HDR content behaves. Happy to dig into whatever turns up.

    One thing to know before you pin it: 6.0.0 raises the tvOS floor to 17.0. That does not affect a visionOS target, and it is a correction rather than a new requirement (the LibDovi tvOS slices were always built with a 17.0 minimum while the manifest claimed 16.0), but it is why this is a major rather than a minor.

    Leaving the issue open until someone has actually run it on device.

  4. jihongboo commented on Jul 30, 2026

    @jihongboo
    ContributorAuthor

    Thanks a lot for your hard work on this! It’s great to see Vision Pro support added to AetherEngine. Really appreciate all the effort you’ve put into the project and for continuously improving it.

  5. superuser404notfound commented on Jul 30, 2026

    @superuser404notfound
    Owner

    And thank YOU and all the other people here that help to make AetherEngine better! Do you have a Vision Pro at hand an can test if it runs?

  6. jihongboo commented on Aug 1, 2026

    @jihongboo
    ContributorAuthor

    No, I don’t have a Vision Pro. However, there is an Apple Store near my house. I’m going to ask if they allow me to download and run my app on their Vision Pro. I’ll share any updates here once I make new progress.

  7. superuser404notfound commented on Oct 27, 2026

    @superuser404notfound
    Owner

    Closing this thread since it has been quiet since August, and the visionOS work has moved on in the meantime (see #812 for the 3D side). Thanks @jihongboo for the request. If you do get a run on a Vision Pro and something does not work, please open a fresh issue with the log, that will be easier to act on than this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions