Fixing ‘Unable to Access Default Device–Set’ in Xcode
When attempting to create a new simulator in Xcode, I encountered the following error:
Unable to access default device–set
This issue has been discussed in the Apple Developer Forums (thread 1, thread 2), but no definitive solution was provided.
Troubleshooting Attempts
Here are the steps I tried, none of which resolved the issue:
- Restarting the Mac.
- Reinstalling Xcode.
- Changing the
xcode-select
path:sudo xcode-select -s ~/Downloads/Xcode.app/
- Manually installing the Simulator runtime (guide).
Root Cause and Solution
The issue was related to permissions. Running the following commands without sudo
failed:
xcrun simctl list devices
xcodebuild -importPlatform ~/Downloads/iOS_18.2_Simulator_Runtime.dmg
The error logs indicated a problem with the ~/Library/Developer/CoreSimulator/Devices
directory:
Error Domain=com.apple.CoreSimulator.SimError Code=400 "Unable to determine SimDeviceSet for subscriptions, set_path=~/Library/Developer/CoreSimulator/Devices"
I found a similar bug reported on Stackoverflow. He indicated that the issue was due to the missing ~/Library/Developer/CoreSimulator/Devices
directory.
Upon investigation, I found that the Developer
directory was owned by root
, causing permission issues:
mkdir ~/Library/Developer/CoreSimulator
# -> Permission denied
To fix this, I changed the ownership of the Developer
directory as same as ~/Library
directory:
drwx------@ 101 paul staff 3232 7 Feb 08:01 Library
sudo chown -R paul:staff ~/Library/Developer
After this, I successfully imported the simulator runtime:
xcodebuild -importPlatform ~/Downloads/iOS_18.2_Simulator_Runtime.dmg
importing ~/Downloads/iOS_18.2_Simulator_Runtime.dmg
Registered as 9A66D486-5FAE-436A-B0E3-DC2AA9F9****.
Now, I can create new simulators in Xcode without any issues. Navigate to Xcode -> Window -> Devices and Simulators -> + to add a new simulator.
Cheers!