I run xcode tests on a simulated device with this script line:
xcodebuild test \
-workspace MyWorkspace.xcworkspace \
-scheme My-Scheme \
-destination 'id=12345678-ASDF-ASDF-ASDF-64DB01A47924'
But it then logs a warning:
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:12345678-ASDF-ASDF-ASDF-64DB01A47924, OS:17.2, name:iPhone 15 Pro }
{ platform:iOS Simulator, id:12345678-ASDF-ASDF-ASDF-64DB01A47924, OS:17.2, name:iPhone 15 Pro }
This doesn't make sense to me, how can there be any ambiguity or a duplication when using the unique identifier?
To debug, I opened the "Devices and Simulators" menu in Xcode and found my simulator device there. It showed only once.
I then opened /Library/Developer/CoreSimulator/Devices/ and found that the id appeared once as a directory there.
Then I ran: xcrun simctl list | grep 12345678-ASDF-ASDF-ASDF-64DB01A47924 and again, only one output.
Am I doing something wrong with my xcodebuild invocation or is this a bug?
xcodebuild -version
Xcode 15.1
Build version 15C65