End-to-End Example#
This example demonstrates how to establish a CloudXR connection between a server and a client using the CloudXR LÖVR plugin and the CloudXR Generic Viewer. Learn more about these samples from their respective GitHub repositories.
Download the samples#
Server: CloudXR LÖVR Plugin that integrates the CloudXR Runtime into an LÖVR application
Client: CloudXR Generic Viewer on Apple Vision Pro
Server Setup#
Windows
Make sure Visual Studio 2022 is installed with CMake individual components.
Add firewall rules to allow CloudXR connection from Apple Vision Pro. Refer to Ports and Firewalls for more details. In Windows Defender Firewall -> Advanced settings, add the following two inbound rules:
Allow UDP connections to local ports 47998, 47999, 48000, 48002, 48005.
Allow TCP connections to local port 48010, 49100.
Start
Developer PowerShell for VS 2022orDeveloper Command Prompt for VS 2022(Non-administrator).Build the LÖVR plugin. Navigate to the directory
cloudxr-lovr-sampleand enter this command:.\build.bat
Run the LÖVR plugin:
.\run.bat
Linux
Install the following dependencies as outlined in https://lovr.org/docs/Compiling#linux:
sudo apt install make cmake xorg-dev libcurl4-openssl-dev libxcb-glx0-dev libx11-xcb-dev python3-minimal
Open up required firewall ports for CloudXR. Refer to Ports and Firewalls for more details.
sudo ufw allow 47995/udp
sudo ufw allow 47998/udp
sudo ufw allow 47999/udp
sudo ufw allow 48000/udp
sudo ufw allow 48001/udp
sudo ufw allow 48002/udp
sudo ufw allow 48005/udp
sudo ufw allow 48008/udp
sudo ufw allow 48012/udp
sudo ufw allow 48010/tcp
sudo ufw allow 49100/tcp
sudo ufw reload
Build the LÖVR plugin: navigate to the directory
cloudxr-lovr-sampleand enter the command:
./build.sh
Run the LÖVR plugin:
./run.sh
Client Setup#
Open
CloudXRViewer.xcodeprojwith Xcode 26.Add CloudXR Framework as a package dependency in the project.
Select
CloudXRViewer-visionOStarget to build for visionOS.
Connection and Testing#
Make sure the server is running on the same network as the client.
In the client:
Set the Manual IP Address for Select Zone.
Under IP Address, input the server IP address.
Enable hand tracking.
Click Connect.
You should now see the following on the headset:
Text:
Received: no dataBlue cubes tracking your finger joints
Windows only: Pinching index and thumb produces an audio tone emanating from the server to within the headset.
Next, test the opaque data channels:
Click the Server Actions tab.
Select the only channel available.
After you connect to the channel, you can toggle between clicking the Action 1 and Action 2 buttons. Notice that the text updates according to the button pressed.
Under Last message received, the LÖVR server app echoes back the message it receives from the button press.