Screen sharing on visionOS

Does LiveKit client-sdk-swift support screen sharing on visionOS 26+? I didn’t find any mention of this. In the demo app ( GitHub - livekit-examples/swift-example: Example app for LiveKit Swift SDK 👉 https://github.com/livekit/client-sdk-swift · GitHub ), it works only for iOS and macOS. I added a new button for screen share on visionOS, and after press it does nothing

print("isScreenShareEnabled \(isScreenShareEnabled)")
try await room.localParticipant.setScreenShare(enabled: !isScreenShareEnabled)
print("Screen share \(isScreenShareEnabled ? "started" : "stopped")")

And logs:
isScreenShareEnabled false
Screen share started

After press button again, the logs are same

I remember when I first joined LiveKit I asked whether our support for visionOS was production-quality, and was told that it was. For that reason, although I don’t have a headset myself to test with, I would expect this to work. Can I please ask you to also raise an issue on the client SDK, Issues · livekit/client-sdk-swift · GitHub ? I found this old issue, and old demo: Cannot screenshare outside of the app · Issue #11 · livekit-examples/vision-demo · GitHub (based on an exchange here: Cannot screenshare outside of the app · Issue #752 · livekit/client-sdk-swift · GitHub ), but if you raise a fresh issue, I can raise it with our client team.

If others in the community have experience with this, would appreciate any additional insight :eyes:

@A, a quick note from the platform side, with the caveat that I haven’t used in Vision Pro code so the workaround needs verification on a headset.

The reason setScreenShare silently no-ops on visionOS is architectural. The Swift SDK’s iOS path uses ReplayKit, and macOS uses ScreenCaptureKit. visionOS doesn’t expose ReplayKit the same way iOS does, and the demo app doesn’t ship a broadcast extension target for visionOS, so the call accepts true and flips the local flag but nothing actually publishes.

I have draw something for you to give you better clarity.

The workaround without waiting for SDK support is to capture frames yourself via ScreenCaptureKit (available on visionOS 2.0+) and push them into a LocalVideoTrack manually. Use SCContentSharingPicker, set up an SCStream with a video output handler, convert each CMSampleBuffer to the pixel format LiveKit expects, and publish that track directly. That sidesteps the iOS broadcast-extension assumption entirely.

docs: ScreenCaptureKit | Apple Developer Documentation

Manual capture is the meantime path…

I don’t have a headset too, I use simulator. But also I have the same problem with screenshare on the iOS (can’t share screen outside of the app)

Thanks for your reply. But I see that ScreenCaptureKit doesn’t support visionOS

But also I have the same problem with screenshare on the iOS

Are you referring to this issue? It seems very coincidental it was raised very recently.