iOS Simulator devices listed twice in Xcode run destinations list
Asked Answered
O

4

10

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.

Obcordate answered 7/11, 2014 at 22:1 Comment(0)
M
6

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.

Misprision answered 8/11, 2014 at 0:17 Comment(5)
I added iOS 7.1 SDK. I suspect it might did something like this. Maybe I add it wrong path. Does adding iOS 7.1 SDK to Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs may did something with this issue?Obcordate
That is not supported, but I don't think it would cause an issue like that. On a side note, why are you using the 7.1 SDK? You should use the 8.0 (or 8.1) SDKMisprision
I tried to run device on iOS 7 devices. Is changing deployment target from 8.1 to 7 is enough? Someone told me to change Base SDK to ios 7.1. I will delete it and try again.Obcordate
Yes, all you need to do is set a deployment target of 7.0 if you want to run on iOS 7.0 and later devices. You should not install older SDKs. Please inform that someone that they are mistaken.Misprision
Adding SDK like that way, causes this issue. I deleted that sdk and it turned to normal. Thanks.Obcordate
S
6

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

Slogan answered 18/9, 2015 at 7:32 Comment(0)
P
4

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.

Phebe answered 7/11, 2014 at 22:6 Comment(4)
First of all thanks, but I don't want to see the identifiers of simulators, what should I do then? And as i pointed out at screenshot, even there are 1 device with iOS 8.1, Run menu shows 2 of them.Obcordate
Delete these simulators and add new ones. Does the same reappear?Phebe
Yes same thing appear. Does adding iOS 7.1 SDK to Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs has something with this issue?Obcordate
@Obcordate - Why would you add an older SDK? The new one covers the old.Phebe
C
2

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.

Chouinard answered 7/11, 2014 at 22:10 Comment(2)
Yes you're right such they were directory identifiers. But i don't want to see them, is there an option to not seeing of directory identifiers? And why there's duplications of simulators?Obcordate
No, those UDIDs are UDIDs (Unique Device IDentification numbers) for the iOS Simulator devices.Misprision

© 2022 - 2024 — McMap. All rights reserved.