title: Xcodebuild: Unable to find a destination matching the provided destination specifier
body: <p>I want to test same unit test on various platform versions.
  However, I can't due to a xcodebuild error.</p>
  <p>I built my project</p>
  <pre><code> xcodebuild build-for-testing \
       -configuration Debug \
       -scheme UnitTest \
       -sdk iphonesimulator \
       -enableCodeCoverage YES \
       -derivedDataPath &quot;derivedData&quot;
  </code></pre>
  <p>and test project executed successfully with the following command:</p>
  <pre><code>xcodebuild test-without-building \
      -configuration Debug \
      -derivedDataPath &quot;derivedData&quot; \
      -resultBundlePath TestResultsA \
      -project UTSSampleSwift.xcodeproj \
      -scheme UnitTest \
      -sdk iphonesimulator \
      -destination 'platform=iOS Simulator,OS=13.5,name=iPhone SE (2nd generation)' \
      -enableCodeCoverage YES
  </code></pre>
  <p>I want to test on OS=12.2 and I already installed the simulators for 12.2
  However, the following command fails</p>
  <pre><code>xcodebuild test-without-building \
      -configuration Debug \
      -derivedDataPath &quot;derivedData&quot; \
      -resultBundlePath TestResultsE \
      -project UTSSampleSwift.xcodeproj \
      -scheme UnitTest \
      -sdk iphonesimulator \
      -destination 'platform=iOS Simulator,OS=12.2,name=iPhone 8' \
      -enableCodeCoverage YES
  </code></pre>
  <p>With error message:</p>
  <pre><code>Build settings from command line:
      SDKROOT = iphonesimulator13.5
  
  xcodebuild: error: Unable to find a destination matching the provided destination specifier:
                  { platform:iOS Simulator, OS:12.2, name:iPhone 8 }
  
          Available destinations for the &quot;UnitTest&quot; scheme:
                  { platform:macOS, arch:x86_64, variant:Mac Catalyst, id:521A4BA2-C8DB-50F6-9112-FA4FB75F8B5D }
                  { platform:iOS Simulator, id:FB9D6640-64BC-48D2-869F-2D8AE3D10984, OS:13.5, name:iPad (7th generation) }
                  { platform:iOS Simulator, id:2327E5B6-8073-4DA7-BB2C-4D9F29E8A74F, OS:13.5, name:iPad Air (3rd generation) }
                  { platform:iOS Simulator, id:176CD5F5-F59D-401F-8D9C-2567C97BF14F, OS:13.5, name:iPad Pro (9.7-inch) }
                  { platform:iOS Simulator, id:50CDB544-EB94-494D-BA02-2A387F49C36A, OS:13.5, name:iPad Pro (11-inch) (2nd generation) }
                  { platform:iOS Simulator, id:2D39CA24-88E5-4012-A461-63404BBF8DD5, OS:13.5, name:iPad Pro (12.9-inch) (4th generation) }
                  { platform:iOS Simulator, id:CEC5D35B-9038-4557-ABD8-414290716B84, OS:13.5, name:iPhone 8 }
                  { platform:iOS Simulator, id:A375FB0B-6F1C-4249-95B8-EC71D9FB6144, OS:13.5, name:iPhone 8 Plus }
                  { platform:iOS Simulator, id:81EFCF5E-372A-4CB4-94D5-409D23237392, OS:13.5, name:iPhone 11 }
                  { platform:iOS Simulator, id:884192AD-0156-4E86-87F7-BFC24D451D33, OS:13.5, name:iPhone 11 Pro }
                  { platform:iOS Simulator, id:A2F32AF0-CE1E-47F3-9D5A-D3E906B7977B, OS:13.5, name:iPhone 11 Pro Max }
                  { platform:iOS Simulator, id:0EB5214D-201F-405F-BDAF-E77089398CA9, OS:13.5, name:iPhone SE (2nd generation) }
  
          Ineligible destinations for the &quot;UnitTest&quot; scheme:
                  { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
                  { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
  </code></pre>
  <p>What should I do?</p>
  <p><strong>Additional information</strong></p>
  <p>xcodebuild -version</p>
  <pre><code>Xcode 11.5
  Build version 11E608c
  </code></pre>
  <p>xcodebuild -showsdks</p>
  <pre><code>iOS SDKs:
      iOS 13.5                        -sdk iphoneos13.5
  iOS Simulator SDKs:
      Simulator - iOS 13.5            -sdk iphonesimulator13.5
  </code></pre>