I’m getting the following error. I didn’t see this anywhere when using the search feature in the forums so figured I’d ask. Might be something simple I’m doing wrong or missed.
I’m trying to get some thing simple working to test I have everything installed correctly. Trying to Build and Run to the Apple Vision Pro Simulator w/ XCode.
Hey there! Sorry you’re running into trouble. This is unfortunately a known issue with com.unity.xr.visionos and Xcode 15.1 beta 2 and above. If your project has an image marker library, you will hit this bug. You can work around the issue by just clicking Build in the Build and Run window. That will pass, even though unfortunately Build and Run will always fail. In fact, I think you might still end up with a working Xcode project in this case, but Unity decides not to try and run because an exception was raised during the build process.
We are working on a fix for this, but unfortunately this affects all versions of com.unity.xr.visionos when Xcode 15.1 beta 2 and above is installed.
Yes, I am having the same problem with the templates visionOSTemplate-0.6.2 with Unity Version 2022.3.11f1
Xcode 15.1 Beta 3
visionOS 1.0 beta 6 (21N5295a) SDK + visionOS 1.0 beta 6 (21N5300a) Simulator (Installed)
Apple Silicon
I checked (Player Settings):
Polyspatial is checked
Apple Vision Pro is checked in the XR Plugin System
Error Message in Unity :
ExecutionFailedException: Execution of actool failed with exit code 1. stderr:
I tried cleaning the build (and using Build instead of Build and Run) and it worked twice randomly without giving the error but then the error went back again.
When I didnt get the build error, I got an error on Xcode
Undefined symbol: _SetPolySpatialNativeAPIImplementation
Undefined symbol: _UnityVisionOS_OnInputEvent
Linker command failed with exit code 1 (use -v to see invocation)
Hi there! Sorry for the delay in getting back to you on this one. Apple recommended that I clear out the contents of ~/Library/Developer/Xcode/UserData/IB Support/Simulator Devices on my machine. Deleting all the sub-folders at that path resolved the issue on my machine.
This may also resolve an issue in Xcode itself, where builds can fail with the following error: /path/to/project/LaunchScreen-iPhone.storyboard:: Failed to find or create execution context for description '<IBPlatformToolDescription_xrOS: 0x600002d396e0> System content for IBCocoaTouchFramework-seventeenAndLater <IBScaleFactorDeviceTypeDescription: 0x600002d39080> scaleFactor=2x, renderMode.identifier=(null)'.
Edit: You may also need to reboot your machine after clearing out the Simulator Devices folder.
Hey! I think I’ve found a more effective workaround on this issue. It seems like there’s a more thorough “nuclear option” to delete more cached simulators and clear the list of “unavailable” simulators. I followed the instructions on this StackOverflow post and now I no longer see a bunch of unavailable devices when I run xcrun simctl list. That hasn’t eliminated the problem entirely, but I went from a setup where this always failed when running it from Unity to only failing sometimes…
I wasn’t courageous enough to try the rm -rf /Library/Developer/** but if you do, you should expect to have to completely re-install Xcode and possibly break some other developer tools that rely on the contents of that folder.
I’m also experimenting with an added argument to the actool command which at first seemed to totally fix this for me, but I still get the same old error from time to time. I was always suspicious about seeing this in the detailed error output:
Failed to find a suitable device for the type IBSimDeviceTypeiPad2x
Why is it looking for an iPad when we’re trying to compile the asset catalog for visionOS?
I tried adding "--filter-for-device-model com.apple.CoreSimulator.SimRuntime.xrOS-1-0" to the list of arguments sent to actool in ACTool.cs, and it seems to have helped? Again, I don’t see the issue as frequently now but it still happens sometimes.
I’ll update this thread if/when we end up shipping this change, but you should be able to try in the meantime by moving com.unity.xr.visionos from Library/PackageCache/ to Packages/, and modify that script to include the extra argument. Just add it to the array in the Compile method. If anyone does try these workarounds, and they work for you, please update this thread!