I'm facing this issue intermittently since using Xcode 16 beta 4 on macOS 14.5 when starting xcodebuild build
with -destination
option.
20:56:07 ▸ xcodebuild: error: Unable to find a device matching the provided destination specifier:
20:56:07 ▸ { platform:iOS Simulator, OS:15.4, name:iPhone 13 Pro }
20:56:07 ▸ The requested device could not be found because multiple devices matched the request. (
20:56:07 ▸ "<DVTiPhoneSimulator: 0x151fb1fe0> {\n\t\tSimDevice: iPhone 13 Pro (CB36E92A-C32D-481C-A407-28123ABEBF66, iOS 15.4, Shutdown)\n}",
20:56:07 ▸ "<DVTiPhoneSimulator: 0x151fb4070> {\n\t\tSimDevice: iPhone 13 Pro (0EBBCB9A-5FBA-4998-903B-1415315D1533, iOS 15.4, Shutdown)\n}"
20:56:07 ▸ )
This mac is mac mini 2023 M2 Pro 32GB memory, running with multiple simruntimes installed:
$ sudo xcrun simctl runtime list
Password:
== Disk Images ==
-- iOS --
iOS 17.5 (21F79) - 9FC1CFB3-33A4-4F31-AF40-BAB448F6FA0D (Ready)
iOS 16.4 (20E247) - 3BFB66B1-075B-4B17-951C-B691BAC41C73 (Ready)
iOS 17.2 (21C62) - C8D4111F-1F7A-4FC2-AC6A-BF68A47EEDCE (Ready)
iOS 17.4 (21E213) - 0B8ECC25-EF76-4744-9D77-8256A57D1605 (Ready)
iOS 18.0 (22A5326g) - 7217B9B2-A113-4B6B-915E-CAB70431B415 (Ready)
iOS 17.0.1 (21A342) - C4FE430B-DD3F-4108-B2E7-B13A04989863 (Ready)
iOS 15.4 (19E240) - CAB77B36-B6D3-4F5D-8956-E7A3105AC910 (Ready)
iOS 18.1 (22B5023e) - 9E53F2C6-BA91-421C-848F-F78043179361 (Ready)
-- tvOS --
tvOS 17.2 (21K364) - 8A9929AE-0521-498D-884A-F87BD16612CD (Ready)
tvOS 16.4 (20L494) - 3354C9A4-E177-4030-98F2-0735970E1607 (Ready)
tvOS 17.4 (21L224) - 724CD6DA-EAC2-4076-A578-C84872A36E5E (Ready)
tvOS 15.2 (19K50) - 0AE51520-B1E2-4ED9-80A4-717291FC5E96 (Ready)
tvOS 18.0 (22J5335e) - E839E471-AA01-46E1-A4AD-DF4B98B46525 (Ready)
tvOS 17.5 (21L569) - C432547A-F7EF-4B34-AD43-D3E839CB49E1 (Ready)
tvOS 17.0 (21J353) - 6A08D50B-D9BF-4496-A5C5-FE21373B11DD (Ready)
tvOS 18.0 (22J5324f) - B2C7CA72-AAE6-4DF9-A4B0-26A0EB9462F7 (Ready)
-- watchOS --
watchOS 11.0 (22R5318h) - 56250DF3-CF78-4C5D-B502-0B53DE16ABEB (Ready)
watchOS 10.4 (21T214) - CC71D3D3-EA19-4F0B-BF3E-388D686AB300 (Ready)
watchOS 10.0 (21R355) - 3623992D-88CF-41CB-8091-AF1F8CE16717 (Ready)
watchOS 10.2 (21S364) - C0666241-AA31-4CF7-98B9-EA5394331DC6 (Ready)
watchOS 9.4 (20T253) - EED82B11-589D-41AF-B290-844F59AECECB (Ready)
watchOS 10.5 (21T575) - 0D749B4E-DC69-4F27-8982-510AB985B822 (Ready)
watchOS 8.3 (19S51) - 8123ABC7-5465-4467-A5DA-CE9C50E1081D (Ready)
watchOS 11.0 (22R5328f) - 648646A0-A370-48A4-881B-15B2422DE698 (Ready)
-- xrOS --
xrOS 2.0 (22N5297g) - C2C8E4EE-3738-4706-823E-2B4138CE90BE (Ready)
xrOS 1.0 (21N305) - 29EAB8D4-160D-4A3B-AB7C-7325D205AC4C (Ready)
xrOS 2.0 (22N5286g) - 1F92EE9A-A5F9-45F7-8075-7FD7BC4EF81E (Ready)
xrOS 1.1 (21O209) - DB15F0B2-C9E4-424D-9A50-8D6EDB131142 (Ready)
xrOS 1.2 (21O5565d) - 83A26410-A8A8-41F6-A5A1-E0A7E24B8BA0 (Ready)
I've never seen this kind of simulator missing error.
Nor installing any duplicate runtime(s) on the same machine because it will show error message like 'unable to use this runtime' on xcrun simctl runtime list
.
Could anyone give me a tip of avoiding this kind of error?