LiveKit SDK + VisionPro

I’m developing an app for visionOS and testing it on AVP (visionOS 26), on iOS 17 and 26 devices, and in simulators (visionOS 2.5). The idea of the app is random video calls.

For video calls I use LiveKit SDK. At the moment, SDK the version is 2.11.0.

Maybe this will help clarify where the problem is:

A user presses the "Start" button, which calls matchingViewModel.startMatching(). After that, matchingViewModel.connectionState changes to .searching. Another user presses "Start" and the same thing happens.

Then the API returns information for both users (myInfo, partners, roomId, myLiveKitToken). When a user receives the room information, matchingViewModel.connectionState changes to .connecting.

At this point, the connection to LiveKit should happen.

In the MatchingWrapperView file, the handleChangeRoomIdOrPartners method checks whether it should connect to LiveKit (when partner information and a room ID are available) or disconnect from the room (when the partner ends the call). The connectRoom method handles connecting to the LiveKit room, enables the camera, and runs emitHasConnectedToLiveKit() (matchingViewModel.connectionState changes to .connected, and information is sent to the other partner that the user has joined LiveKit).

When testing visionOS device + visionOS device or iPhone or visionOS simulator, most of the time the video from the iPhone is not shown on the visionOS device. Less often, the video from the visionOS device is not shown on the iPhone or in the simulator.

When testing iPhone + iPhone + visionOS simulator, everything usually works fine. Occasionally the video doesn’t appear, but this happens much less often.

Maybe you know why this issue occurs much more frequently on visionOS?

Here is all the code for the core functionality. If you need any additional code, please let me know.

RoomModel.swift

Hey @personavision,

This appears to be an issue with a third party SDK. Are you able to demonstrate the issue in a test project created from one of Xcode's templates, and using only Apple APIs? If not, you should check with the support resources provided by the LiveKitSDK team to get assistance with their software.

This may be a timing issue, either in your code or the third party library. Try investigating the timing around the room connection and when your app signals it is connected. It's possible that you are attempting to connect before the connection can be made.

You can find tips on creating and sharing a test project in Creating a Test Project.

Thanks,
Michael

LiveKit SDK + VisionPro
 
 
Q