Is there a way to run my Xcode project with the engine on a simulator? It currently only runs on an actual Vision Pro which I dont always have access to.
I donât see why not⌠but I have never experimented with xcode simulators
You should be able to run the PulseScenarioDriver executable through a simulatorâŚ
Unity might also have a vison pro simulator⌠but I have not played with it
I changed the Sysroot from XROSPlatfrom to XRSimulator and still seem to be getting a build only able to run an actual AVP and not simulator? Also as a note, this is a native project using Apples RealityKit, not Unity.
Error: Building for âvisionOS-simulatorâ, but linking in object file (/Users/fahim/Desktop/Academy Projects/RealisticALSTraining/RealisticALSTraining/Pulse/Libs/Simulator/libPulse.a2) built for âvisionOSâ
I assume you would build the VisonOS binaries
Then in XCode, switch to a simulator to run those binaries.
Pretty sure this is an XCode thing, not a CMake thing
It was a Cmake toolchain file issue. The current one I believe doesnât work on simulator but there was an open source toolchain file for visionOS which I used and now its running on the simulator.
Interesting
Can you post a link to that toolchain
Of course!
These were also the set of commands I used:
`# 1. Go to the build folder and clean it
cd ~/Desktop/PulseEngine/XRSimBuild
rm -rf *
2. CRITICAL: Set the Global Platform Variable
This prevents the sub-builds (like absl) from crashing.
export _PLATFORM=SIMULATOR_VISIONOS
3. Configure CMake
Uses the ios-cmake toolchain with the VisionOS Simulator flag
cmake -G âUnix Makefilesâ
-DCMAKE_TOOLCHAIN_FILE=~/Desktop/ios.toolchain.cmake
-DPLATFORM=SIMULATOR_VISIONOS
-DDEPLOYMENT_TARGET=1.0
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=./install
-DBUILD_SHARED_LIBS=OFF
-DBUILD_TESTING=OFF
-DPulse_NATIVE_BUILD_DIR=../nativeBuild
-DPulse_C_AS_STATIC=ON
-DPulse_JAVA_API=OFF
-DPulse_PYTHON_API=OFF
../engine
4. Compile and Install
And I used make to install since its a Unix Makefile which also seems to be necessary because when I generate Xcode I had issues.
`
And then of course as an Xcode thing, you must set the Library search paths accordingly so Xcode knows where to look for the binaries.

