Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Simulator devices listed twice in Xcode run destinations list

Xcode is showing duplicate entries in the run destinations list for each iOS Simulator device.

Screenshot of the run destinations:
enter image description here

Screenshot from Devices menu:
enter image description here

I tried to completely closing and opening Xcode, and it did not solve the problem. Rebooting also did not solve the problem.

I added iOS 7.1 SDK to the Xcode.app's bundle.

like image 833
taskiner Avatar asked Nov 07 '14 22:11

taskiner


2 Answers

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:

killall -9 com.apple.CoreSimulator.CoreSimulatorService

I have not seen an issue like this before where the device itself really is duplicated in the run destinations list. Other reports have been that there really were duplicated devices (with unique UDIDs), but in your case, you are seeing duplicates of the exact same device.

If the issue is continuing to reproduce, please enable debug logging:

defaults write com.apple.iphonesimulator DebugLogging -bool YES
defaults write com.apple.CoreSimulator DebugLogging -bool YES

Reproduce the issue with debug logging enabled, and then file a bug report at http://bugreport.apple.com including ~/Library/Logs/CoreSimulator/*.log and /var/log/system.log.

If you have any idea how you got into this state, please share it.

EDIT:

Based on discussion in comments, the issue was caused by adding the iOS 7.1 SDK (not the simulator SDK, the device SDK). This is not a supported configuration, but it is certainly odd that doing so caused this issue. Please note that you should always build against the newest SDK and just set the deployment target to the minimum version you wish to deploy to.

like image 70
Jeremy Huddleston Sequoia Avatar answered Jun 20 '23 15:06

Jeremy Huddleston Sequoia


I stumbled across this issue as well, because over time I did manually (via Xcode) install various additional iOS simulators.

So, what I really wanted was to get rid of the old and outdated simulator version.

  1. quit Xcode and iOS Simulator

  2. sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

  3. rm -rf ~/Library/Developer/CoreSimulator/Devices

  4. reopen Xcode

like image 24
leviathan Avatar answered Jun 20 '23 14:06

leviathan