The requested device could not be found because multiple devices matched the request.

Hello,

This is the repost of the issue reply from Xcode 16 beta 2 with multiple iOS simruntime installed macs.

I stopped using sudo as Apple Developer Tools Engineer said but the same thing goes on the phase of xcodebuild with old simulator destinations.

15:39:45 Exit status of command 'set -o pipefail && xcodebuild -project "SampleApp.xcodeproj" -scheme "SampleApp" -configuration "Release" clean -destination "platform=iOS Simulator,name=iPhone 13 Pro,OS=15.4" -derivedDataPath "/path/to/.derived_data/sim_app" build | tee '/path/to/artifacts/logs/build_sim/xcodebuild.log' | xcpretty --color --simple' was 70 instead of 0.

15:39:45 2024-09-25 15:39:14.700 xcodebuild[91142:22610080] Malformed bundle does not contain an identifier at /Library/Developer/CoreSimulator/Volumes/tvOS_22J5335e/Library/Developer/CoreSimulator/Profiles/Runtimes/tvOS 18.0.simruntime

15:39:45 2024-09-25 15:39:14.760 xcodebuild[91142:22610212] Malformed bundle does not contain an identifier at /Library/Developer/CoreSimulator/Volumes/tvOS_22J5335e/Library/Developer/CoreSimulator/Profiles/Runtimes/tvOS 18.0.simruntime

15:39:45 2024-09-25 15:39:43.986 xcodebuild[91142:22610077] Writing error result bundle to /var/folders/t2/vppt8b613w1b1pwfycwzgnc00000gr/T/ResultBundle_2024-25-09_15-39-0043.xcresult

15:39:45 xcodebuild: error: Unable to find a device matching the provided destination specifier:

15:39:45 		{ platform:iOS Simulator, OS:15.4, name:iPhone 13 Pro }

15:39:45 

15:39:45 	The requested device could not be found because multiple devices matched the request. (

15:39:45     "<DVTiPhoneSimulator: 0x12467d3e0> {\n\t\tSimDevice: iPhone 13 Pro (7C44F49C-1406-4675-8297-0BB1E32030A4, iOS 15.4, Shutdown)\n}",

15:39:45     "<DVTiPhoneSimulator: 0x1246788e0> {\n\t\tSimDevice: iPhone 13 Pro (723AB83F-84B2-4553-A7FB-FE97FBC72A12, iOS 15.4, Shutdown)\n}"

15:39:45 )

...

15:39:45 	Available destinations for the "SampleApp" scheme:

15:39:45 		{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006020-0014092C3498C01E, name:My Mac }

15:39:45 		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

15:39:45 		{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }

15:39:45 		{ platform:visionOS Simulator, variant:Designed for [iPad,iPhone], id:5E4672C1-BFDC-4BF8-AECC-9101CAF005E2, OS:2.0, name:Apple Vision Pro }

15:39:45 		{ platform:visionOS Simulator, variant:Designed for [iPad,iPhone], id:F828FD1C-C6A9-4671-8A30-45888FE542C2, OS:2.1, name:Apple Vision Pro }

15:39:45 		{ platform:iOS Simulator, id:27B137B4-DDF5-4091-A77B-AEAE819E60BE, OS:15.4, name:iPad (9th generation) }

15:39:45 		{ platform:iOS Simulator, id:27B137B4-DDF5-4091-A77B-AEAE819E60BE, OS:15.4, name:iPad (9th generation) }

15:39:45 		{ platform:iOS Simulator, id:84E80242-3066-45BB-BE4A-24EC1512BE0E, OS:15.4, name:iPad (9th generation) }

15:39:45 		{ platform:iOS Simulator, id:84E80242-3066-45BB-BE4A-24EC1512BE0E, OS:15.4, name:iPad (9th generation) }



...



15:39:45 		{ platform:iOS Simulator, id:723AB83F-84B2-4553-A7FB-FE97FBC72A12, OS:15.4, name:iPhone 13 Pro }

15:39:45 		{ platform:iOS Simulator, id:723AB83F-84B2-4553-A7FB-FE97FBC72A12, OS:15.4, name:iPhone 13 Pro }

15:39:45 		{ platform:iOS Simulator, id:7C44F49C-1406-4675-8297-0BB1E32030A4, OS:15.4, name:iPhone 13 Pro }

15:39:45 		{ platform:iOS Simulator, id:7C44F49C-1406-4675-8297-0BB1E32030A4, OS:15.4, name:iPhone 13 Pro }

15:39:45 		{ platform:iOS Simulator, id:AA3C6F9C-A503-4301-8C70-760D20F31103, OS:15.4, name:iPhone 13 Pro Max }

15:39:45 		{ platform:iOS Simulator, id:AA3C6F9C-A503-4301-8C70-760D20F31103, OS:15.4, name:iPhone 13 Pro Max }
...

Seems like the simruntimes are launched twice but have no decisive clue.

For reproduction of the symptom, I'll add xcrun simctl runtime list:

% xcrun simctl runtime list
== Disk Images ==
-- iOS --
iOS 18.1 (22B5069a) - 558B1106-009E-4997-9915-68CA501B96DE (Ready)
iOS 17.2 (21C62) - 04813A2D-9A0B-4CD2-97DD-92BE5937560C (Ready)
iOS 17.4 (21E213) - 4532CD64-DDFC-4EB8-9D40-A2EF0A6D7CCC (Ready)
iOS 17.5 (21F79) - 5225F9C1-D3B7-4CA8-95FE-C698C1EFA1DF (Ready)
iOS 18.1 (22B5045f) - 72FF0A8A-5B59-4303-9683-0B5A3148F3E5 (Ready)
iOS 16.4 (20E247) - E1699E3D-1F68-4535-94D4-F584D3232D79 (Ready)
iOS 17.0.1 (21A342) - EC730386-D17C-4C1A-92A5-F06B6C502F4E (Ready)
iOS 18.0 (22A3351) - 9B46965A-BB9C-4084-9F79-7BB67CCFF94E (Ready)
iOS 15.4 (19E240) - 28A82EA5-0FE4-4595-BE6E-5EB93098547F (Ready)
-- tvOS --
tvOS 17.2 (21K364) - 13634086-0FA9-49CA-BB04-E7E5C8803F28 (Ready)
tvOS 15.2 (19K50) - 753520B7-93B1-4217-AD01-239C92386B5D (Ready)
tvOS 16.4 (20L494) - B243C672-A2FD-428E-A910-5EA108403E7B (Ready)
tvOS 18.1 (22J5543e) - 00E73B3D-2821-42EE-8448-EB28D3E95D9B (Ready)
tvOS 17.0 (21J353) - 794FFE83-76EB-4CCE-91D4-6A27E88F2FE2 (Ready)
tvOS 18.1 (22J5567a) - DA90203F-C57A-4E57-B6E1-6549F57D3D32 (Ready)
tvOS 17.4 (21L224) - BBEAC6EA-7F1C-4D02-A10A-8B7ECCCEB6F7 (Ready)
tvOS 17.5 (21L569) - 4714379D-46CF-402B-BBFD-FE9E384D3721 (Ready)
tvOS 18.0 (22J356) - 0FF86611-1B12-4188-94D0-1C7B3E32BB23 (Ready)
-- watchOS --
watchOS 9.4 (20T253) - F54A4AA5-4D95-4BFB-B290-ADCAB5C3F554 (Ready)
watchOS 11.1 (22R5569a) - 9F78E186-30D4-436D-B5B2-B0D0849BF3A2 (Ready)
watchOS 11.1 (22R5545f) - 17E76267-0F3B-4E35-9516-36F8D8A31B76 (Ready)
watchOS 10.4 (21T214) - 4BE2D5F2-B4AB-4144-ADD3-28EF4D95928B (Ready)
watchOS 8.3 (19S51) - B2FC21B1-E408-4BCD-924D-DA9712BB2CE9 (Ready)
watchOS 10.0 (21R355) - F85C098B-BF3E-4E80-A5A7-6D351724806B (Ready)
watchOS 10.2 (21S364) - 7219764C-D3AE-4744-A8CC-26403E2E6F0B (Ready)
watchOS 10.5 (21T575) - 469E571D-4AA0-4E41-A788-DE0A302C6830 (Ready)
watchOS 11.0 (22R349) - 91D05834-73B0-4942-A9FB-8813DDE047E6 (Ready)
-- xrOS --
xrOS 2.1 (22N5567a) - 34E59475-EA24-4BDF-8A04-C171B408F94B (Ready)
xrOS 2.1 (22N5548c) - 1D30800B-82AC-41C2-A1CE-3A24ABF7FE40 (Ready)
xrOS 1.1 (21O209) - 0B623825-9B01-4948-86D7-C11E2EACDFC1 (Ready)
xrOS 1.2 (21O5565d) - 62ADDB4B-D407-4966-952E-513FE39AE7B2 (Ready)
xrOS 1.0 (21N305) - 695C785B-09B6-4181-AC14-284B3EA37163 (Ready)
xrOS 2.0 (22N318) - 6FE72E19-1B8D-4F2C-B53B-F39DEE71C492 (Ready)

Total Disk Images: 33 (183.3G)

Thanks in advance.

The requested device could not be found because multiple devices matched the request.
 
 
Q