-
Notifications
You must be signed in to change notification settings - Fork 31
Building
Building alvr-org requires a computer with macOS 13 Ventura or later.
Click to show instructions
Create an Apple developer account for free at developer.apple.com. A paid account is not required for running on your own headset.
Install Xcode or Xcode Beta from developer.apple.com/xcode.
After Xcode is installed, install the Xcode command line tools by opening Terminal.app and then running:
sudo xcode-select -s /Applications/Xcode.app
xcode-select --install
(You may need to adjust /Applications/Xcode.app
in the first command to the location of your Xcode install, if you are using a Beta or have installed it elsewhere)
In Terminal.app, install homebrew using the instructions at https://brew.sh
In Terminal.app, run:
brew install git
If you did not already have homebrew installed, skip this step.
brew remove rust rustup-init
In Terminal.app, run the curl command from https://rustup.rs/
In Terminal.app, run:
rustup update
rustup self update
Open Xcode. If it is the first launch, install the macOS, iPhoneOS, and visionOS SDKs as prompted. Otherwise, go to Xcode
> Settings...
, then click on the Platforms tab and install the macOS, iPhoneOS, and visionOS SDKs.
Click to show instructions
In Terminal.app, run:
git clone --recursive https://github.com/alvr-org/alvr-visionos.git
cd alvr-visionos
In the same terminal, run zsh build_and_repack.sh
to build the ALVR client library framework.
Open ALVRClient.xcodeproj
in Finder, or open it directly with Xcode.app
> File
> Open...
. Then, click on the Project Navigator icon:
Next, click on the *ALVR Client project, then click on Signing and Capabilities. Then, change the Team to your own signing keys.
At the top of the window, click on the current device, then click on Manage Run Destinations. Leave this window open for the next step.
Ensure that your Apple Vision Pro and computer are on the same network, and that Bluetooth is enabled on both.
On your Apple Vision Pro, go to Settings
> General
> Remote Devices
. Leave this window open for the next step.
On your computer, in Xcode, the headset should now appear under Discovered. Click Pair and proceed with the pairing process.
On your Apple Vision Pro, go to Settings
> Privacy & Security
and enable Developer Mode.
Exit out of the Run Destinations window. In the main Xcode window, select the newly-paired Vision Pro, then click the Run and Debug button. The first run may take a very, very long time, so be patient.
After the app launches, grant the local network and microphone permissions.
At the bottom of the Xcode window, look for the application log and Cmd+F for "hostname" to find the hostname.
Ensure that your PC is running the latest ALVR nightly (v21). Add the hostname and IP address from the previous step to ALVR manually. The visionOS ALVR client should now connect to the PC automatically, as long as SteamVR is open.
Click to show instructions
In general, you can always delete the alvr-visionos
directory and start from scratch if you are having trouble. Additionally, you may want to re-read the building instructions from time to time, since they can sometimes change and improve as the project develops. That aside, the general updating workflow is as follows:
In Terminal.app, change directory to the alvr-visionos
folder and pull the latest changes:
cd alvr-visionos
git pull origin main
If git
complains about "uncommitted changes", run the following command:
git stash
You may have to re-do the steps in Prepare Xcode for building and debugging as a result of running git stash
.
Continuing in Terminal.app, re-build the ALVR library:
zsh build_and_repack.sh
Finally, rebuild the client in Xcode following the steps in Build and run the application from above.
Make sure Xcode is installed at /Applications/Xcode.app
, and then run sudo xcode-select --switch /Applications/Xcode.app
.
Make sure the ALVR framework is is built successfully (by running the build_and_repack.sh
script), then select Product -> Clean Build Folder in Xcode, and then build the client again.
Use a device-specific Development provisioning profile instead of a Distribution provisioning profile, or change the com.worthdoingbadly.
prefix to your own registered bundle identifier prefix.
The ALVR server/PC version must match the client. You can download a current nightly build here.