Hello,
I just installed XCode 11.4 (11E146), but the simulator is missing.
I tried to create simulator, from Device and Simulators window.
Select iPhone 11 and iOS 13.4, but got error
Could not create iPhone 11, unable to access default device set.
On terminal, i try to run
xcrun simctl list devices
But got following response (errors)
2020-04-12 14:45:38.909 simctl[1161:16568] Error Domain=com.apple.CoreSimulator.SimError Code=160 "Unable to determine SimDeviceSet, set_path=(null)" UserInfo={NSLocalizedDescription=Unable to determine SimDeviceSet, set_path=(null), NSUnderlyingError=0x7fe6a846e400 {Error Domain=NSPOSIXErrorDomain Code=12 "Cannot allocate memory" UserInfo={NSLocalizedFailureReason=Allocation or initialization failed., NSLocalizedDescription=Failed to initialize simulator device set.}}}
Unable to locate device set: Error Domain=com.apple.CoreSimulator.SimError Code=160 "Failed to initialize simulator device set." UserInfo={NSLocalizedFailureReason=Failed to subscribe to notifications from CoreSimulatorService., NSLocalizedDescription=Failed to initialize simulator device set., NSUnderlyingError=0x7fe6a846eb80 {Error Domain=com.apple.CoreSimulator.SimError Code=160 "Unable to determine SimDeviceSet, set_path=(null)" UserInfo={NSLocalizedDescription=Unable to determine SimDeviceSet, set_path=(null), NSUnderlyingError=0x7fe6a846e400 {Error Domain=NSPOSIXErrorDomain Code=12 "Cannot allocate memory" UserInfo={NSLocalizedFailureReason=Allocation or initialization failed., NSLocalizedDescription=Failed to initialize simulator device set.}}}}}
I am using Macbook Pro Retina 13" mid 2014 with macOS Catalina (as far as I know, is latest software, being just updated last week).
What i did
- Clear ~/Library/Caches
- Clear ~/Library/Developers/CoreSimulator/Devices
- kill coresimulator and restart XCode (and reboot mac)
EDIT:
running the above command with as root;
sudo xcrun simctl list devices
gives following output
== Devices ==
-- iOS 13.4 --
iPhone 8 (13D81161-AB37-4A1E-95E9-59777D19B5B3) (Shutdown)
iPhone 8 Plus (74251CC6-3F36-4672-A15A-CF6B303D707C) (Shutdown)
iPhone 11 (066A777A-5D26-4574-A9C2-B52A4F6088A0) (Shutdown)
iPhone 11 Pro (AF5A7E58-D214-4A21-996B-42AAAD9A8B83) (Shutdown)
iPhone 11 Pro Max (0EACAC94-647F-4576-87EC-4D6823595A57) (Shutdown)
iPad Pro (9.7-inch) (66B86F30-C9E1-4DA3-8776-7DF17E33A061) (Shutdown)
iPad (7th generation) (41F204D0-1AFE-4D75-BA71-CD5A8C5FC1B0) (Shutdown)
iPad Pro (11-inch) (2nd generation) (E6C1560B-2C86-4062-8336-9E316D021EE6) (Shutdown)
iPad Pro (12.9-inch) (4th generation) (1E4CE07B-47D4-45D5-AED4-75E5326C731A) (Shutdown)
iPad Air (3rd generation) (9AC08F11-970D-46E1-8E8C-649F633F469C) (Shutdown)
-- tvOS 13.4 --
Apple TV (7584628C-0856-4811-AA5D-CB5814CF3D2D) (Shutdown)
Apple TV 4K (0F79B404-9F32-438E-B83B-9542BECF7142) (Shutdown)
Apple TV 4K (at 1080p) (77ED7F59-EE29-4812-95F7-60D35D0E97A4) (Shutdown)
-- watchOS 6.2 --
Apple Watch Series 4 - 40mm (A1BAB646-978F-4707-825A-B0BF61CBE609) (Shutdown)
Apple Watch Series 4 - 44mm (A56F8095-1743-4168-B15D-5D3A687D29FA) (Shutdown)
Apple Watch Series 5 - 40mm (70CC0DB0-2218-48DE-A00A-6109FFA0C183) (Shutdown)
Apple Watch Series 5 - 44mm (AE9173A1-345E-44ED-B7EB-9DE0B59BCF4C) (Shutdown)
And also, launching the simulator as root
sudo /Volumes/extdisk/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID '0EACAC94-647F-4576-87EC-4D6823595A57'
does show the simulator window of an iPhone, but not if run without sudo.
Please guide, thank you.