iOS Simulator devices listed twice in Xcode run destinations list

半腔热情 提交于 2019-12-18 21:12:24

问题


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

Screenshot of the run destinations:

Screenshot from Devices menu:

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.


回答1:


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.




回答2:


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




回答3:


To 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.




回答4:


Not sure why this is happening, but those UDID-like strings might refer to the directory identifiers for your apps once they are installed in the simulator.



来源:https://stackoverflow.com/questions/26810797/ios-simulator-devices-listed-twice-in-xcode-run-destinations-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!