I've updated to Xcode 10 GM, removed the Xcode 10 beta but for some reason none of the simulators ever start. After waiting for awhile, I get this error:
The operation couldn’t be completed. (DVTCoreSimulatorAdditionsErrorDomain error 0.)
What does that mean and how do I solve this?
So, apparently the only solution is to restart your Mac
There are many possible solutions for this:
Quit simulator (shortcut: cmd + Q) and try again
Reset simulator content. Select Simulator. Goto Hardware tab -> Erase All Content and Settings...
OR
Run xcrun simctl erase all command in terminal.
Restart you Mac machine
Solution 2 worked for me!
Related
When I try to run a project (even a default single view app) in Xcode 10.2 (also occoured on Xcode 10.3 and beta 11 build 3) the simulator launches but then closes but Xcode still thinks it's running (looks like it is running headless). Any ideas on how I can see the simulator?
I have tried the following so far but the only time I can see the Simulator is on its first launch after that it disappears after launching.
Uninstalling and re-installing Xcode (making sure to delete all related directories and doing a system restart)
Adding and removing simulators from window -> Devices and simulators from within Xcode
Tried clearing the simulator cache xcrun simctl erase all
Tried running the following sudo killall -10 com.apple.CoreSimulator.CoreSimulatorService
Clearing Derived data ~/Library/Developer/Xcode/DerivedData/
Another thing I noticed is if I run: /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator I get the following error:
Bus error: 10
But if I run: sudo/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator the Simulator launches fine.
Thanks for any help.
When I update Xcode to Version 10 GM, build success, but Simulator can't work! with error:
The operation couldn’t be completed. (DVTCoreSimulatorAdditionsErrorDomain error 0.)
run xcrun simctl erase all in Terminal. It should solve the issue.
i think its a bug from Apple.
I had the same issue. Not 1 simulator worked and the UIStoryboard was not rendering any graphics. The solution was to restart my mac. Not just Xcode but your Mac (laptop, mac mini, whatever you might be using)
I'm using Xcode 8 and cannot run a playground. As soon as the playground opens and starts to build the file I get this error:
Under Preferences -> Components in Xcode I do not see any iOS 10 Simulators available for install:
I have Xcode 6.4, 7.3, and 8.0 installed but my command line tools are pointing to Xcode 8. How can I fix this issue?
Restarting my computer and opening Xcode 8 before 7 or 6 fixed this error and made Xcode 8 playgrounds start working again.
Quit all Xcode versions you have running. Quit the simulators as well.
Then open the desired Xcode version.
Go to Xcode >> Preferences >> Locations >> Command Line Tools >> and change it to match the Xcode version you've just selected. You have to do this manually each time you switch between different Xcode versions! To be on the safe side just delete the derived data as well. But I'm usually able to get it to work without that.
If that didn't work then also restart your mac.
As you can see in the screenshot, I am getting this weird string for some simulators. How can I fix this?
It happened to me,when there were both Xcode7-beta and Xcode6 in my Mac.
As you see,UDID-like strings are UDIDs (Unique Device IDentification numbers) for the iOS Simulator devices. As they are duplicated devices with unique UDIDs,to there are two ways to solve this problem,:
I suspect the issue will go away if you restart the service:
Quit Xcode, Instruments, and the iOS Simulator and then run this in Terminal.app:
sudo killall -9 Xcode 'iOS Simulator' com.apple.CoreSimulator.CoreSimulatorService
Then
rm -rf ~/Library/Developer/CoreSimulator/Devices
Just change and rename your simulators: In xCode go to Window -> Devices and press the plus in the bottom corner and add the simulators that you wish or minus to remove.
Then it'll be ok:
Thanks to #stevechen for pointing me in the right direction, I finally solved this problem :
Xcode Menu > Open Developer Tools > Open iOS Simulator
iOS Simulator Menu > Hardware > Device > Manage Devices
Delete all the bad entries
Add then back
Enjoy!
I ended up running this:
killall Xcode
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
rm -rf ~/Library/Developer/CoreSimulator/Devices
open /Applications/Xcode.app
Per this SO answer: https://stackoverflow.com/a/31421158/406
It worked great for me!
Xcode 6.4
I created a new project in XCode.
File > New > Playground (option+shift+cmd+N)
I restarted my XCode and also rebooted my system, but still same error.
From the developer forums, this worked for me:
Quit Xcode
Delete the folder /Users/<username>/Library/Developer/CoreSimulator/Devices. For example, in Terminal: rm -rf ~/Library/Developer/CoreSimulator/Devices
In Terminal: killall -9 com.apple.CoreSimulator.CoreSimulatorService (or just reboot).
Fox Xcode 7, I had to install iPad Air or iPad Air 2 for the playground to work.
Another possible way to encounter that issue is to get Xcode being auto-updated, while the simulator was launched.
The solution is like mentioned above but more polite:
Quit Xcode and Simulator app
Run in Terminal: killall -9 com.apple.CoreSimulator.CoreSimulatorService
Launch Xcode and find that all fixed now.
Sure, you can just reboot instead.
Try navigating to the Xcode Menu
Window >> devices (shift+cmd+2) a new window will pop up.
On the bottom left, add a new simulator, specifically one running on iOS 8.0 to the existing list.
Restart Xcode.
As referred by #Mayank Gupta , It worked on adding new simulator and restarting the XCode.