Unable to locate a developer disk image that can be used to enable DDI services

I tried the sample project.
For the Xcode build on visionOS Simulator everything works perfectly.
I tried to build on Xcode with targeted visionOS device, then i got this error.
“Unable to locate a developer disk image that can be used to enable DDI services.”
I work with Apple M1.

I had this problem too at one point, but doing the actions as described here worked for me:

thank you for your reply [Stijn2097], but unfortunately that doesn’t fix the problem for me.

For those of you who are experiencing the problem, this solution worked for me:

  1. Uninstall xcode and empty the garbage.

  2. Delete files associated with Xcode, open the terminal and issue the commands :
    sudo rm -rf ~/Library/Developer/
    sudo rm -rf ~/Library/Caches/com.apple.dt.Xcode/
    sudo rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
    sudo rm -rf ~/Library/Application\ Support/Xcode/
    sudo rm -rf ~/Library/Developer/
    sudo rm -rf /Library/Developer/

  3. Remove command-line tools :
    sudo rm -rf /Library/Developer/CommandLineTools

  4. Switch off computer.

  5. Download Xcode 15 beta 8.
    Sign In - Apple

2 Likes