GitToTheHub opened a new pull request, #1596:
URL: https://github.com/apache/cordova-ios/pull/1596

   - Under some circumstances the run on an identifiers like `iPhone-16-Pro, 
18.5" did not work
   - Support identifiers with and without hypens
   - Support targeting a simulator UDID
   - Generated-By: Visual Studio Code Copilot, GPT-5, GPT-5.1-Codex-Max
   
   <!--
   Please make sure the checklist boxes are all checked before submitting the 
PR. The checklist is intended as a quick reference, for complete details please 
see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   
   
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   I wanted to test in two simulators:
   - iPhone 16 Pro, iOS 18.5
   - iPhone 17 Pro, iOS 26.2
   
   When I do `cordova run ios --list`, I get:
   
   ```bash
   Available iOS Devices:
   Available iOS Simulators:
        iPhone-17-Pro, 26.2
        iPhone-17-Pro-Max, 26.2
        iPhone-Air, 26.2
        iPhone-17, 26.2
        iPhone-16e, 18.5
        iPhone-16e, 26.2
        iPad-Pro-13-inch-M5-12GB, 26.2
        iPad-Pro-11-inch-M5-12GB, 26.2
        iPad-Pro-11-inch-M4-8GB, 18.5
        iPad-Pro-13-inch-M4-8GB, 18.5
        iPad-mini-A17-Pro, 18.5
        iPad-mini-A17-Pro, 26.2
        iPad-Air-13-inch-M3, 18.5
        iPad-Air-13-inch-M3, 26.2
        iPad-Air-11-inch-M3, 18.5
        iPad-Air-11-inch-M3, 26.2
        iPhone-16-Pro, 18.5
        iPhone-16-Pro-Max, 18.5
        iPhone-16, 18.5
        iPhone-16-Plus, 18.5
        iPhone-16-Plus, 26.2
        iPad-A16, 18.5
        iPad-A16, 26.2
   ```
   
   When I tried to run
   
   ```bash
   cordova run ios --target="iPhone-16-Pro, 18.5"
   ```
   
   it always failed with this log:
   
   ```bash
   Building for "iPhone 16 Pro" Simulator 
(com.apple.CoreSimulator.SimDeviceType.iPhone-16-Pro, iPhone-16-Pro).
   Building project: 
/Users/manuelbeck/Projekte/Cordova/inappbrowser-test/platforms/ios/App.xcworkspace
        Configuration: Debug
        Platform: emulator
        Target: iPhone 16 Pro
   Command line invocation:
       /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace 
App.xcworkspace -scheme App -configuration Debug -sdk iphonesimulator 
-destination "platform=iOS Simulator,name=iPhone 16 Pro" build
   
   Build settings from command line:
       SDKROOT = iphonesimulator26.2
   
   Resolve Package Graph
   
   
   Resolved source packages:
     Cordova: 
/Users/manuelbeck/Projekte/Cordova/inappbrowser-test/platforms/ios/packages/cordova-ios
 @ local
     CordovaPlugins: 
/Users/manuelbeck/Projekte/Cordova/inappbrowser-test/platforms/ios/packages/cordova-ios-plugins
 @ local
   
   2025-12-24 08:24:27.323 xcodebuild[67011:3890314] Writing error result 
bundle to 
/var/folders/dd/pn74z8g12134x2j32447spch0000gn/T/ResultBundle_2025-24-12_08-24-0027.xcresult
   xcodebuild: error: Unable to find a device matching the provided destination 
specifier:
                { platform:iOS Simulator, OS:latest, name:iPhone 16 Pro }
   
        The requested device could not be found because no available devices 
matched the request.
   
        Available destinations for the "App" scheme:
                { platform:macOS, arch:arm64, variant:Mac Catalyst, 
id:00008132-000479040283001C, name:My Mac }
                { platform:macOS, arch:x86_64, variant:Mac Catalyst, 
id:00008132-000479040283001C, name:My Mac }
                { platform:iOS, arch:arm64, id:00008030-001A09410213802E, 
name:iPhone von Manuel }
                { platform:iOS, 
id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
                { platform:iOS Simulator, 
id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, 
name:Any iOS Simulator Device }
                { platform:macOS, variant:Mac Catalyst, name:Any Mac }
                { platform:iOS Simulator, arch:arm64, 
id:A6F204F6-2F93-467E-BDB4-4E2CBA240808, OS:18.5, name:iPad (A16) }
                { platform:iOS Simulator, arch:x86_64, 
id:A6F204F6-2F93-467E-BDB4-4E2CBA240808, OS:18.5, name:iPad (A16) }
                { platform:iOS Simulator, arch:arm64, 
id:7DC45C5B-6156-4019-A4B7-37FF5DDEFADA, OS:26.2, name:iPad (A16) }
                { platform:iOS Simulator, arch:arm64, 
id:85505E96-F4D2-45B5-A200-778A7BF15F8F, OS:18.5, name:iPad Air 11-inch (M3) }
                { platform:iOS Simulator, arch:x86_64, 
id:85505E96-F4D2-45B5-A200-778A7BF15F8F, OS:18.5, name:iPad Air 11-inch (M3) }
                { platform:iOS Simulator, arch:arm64, 
id:EE79BC7E-07B0-4B74-B69F-12D6F57F6E9B, OS:26.2, name:iPad Air 11-inch (M3) }
                { platform:iOS Simulator, arch:arm64, 
id:5A217808-545F-411B-9A98-BB0EC01E6ADA, OS:18.5, name:iPad Air 13-inch (M3) }
                { platform:iOS Simulator, arch:x86_64, 
id:5A217808-545F-411B-9A98-BB0EC01E6ADA, OS:18.5, name:iPad Air 13-inch (M3) }
                { platform:iOS Simulator, arch:arm64, 
id:AA7145A2-84DB-4458-9C22-30E3C7D9DD74, OS:26.2, name:iPad Air 13-inch (M3) }
                { platform:iOS Simulator, arch:arm64, 
id:3438A97D-4024-4361-B2E2-BF99573F7B16, OS:18.5, name:iPad Pro 11-inch (M4) }
                { platform:iOS Simulator, arch:x86_64, 
id:3438A97D-4024-4361-B2E2-BF99573F7B16, OS:18.5, name:iPad Pro 11-inch (M4) }
                { platform:iOS Simulator, arch:arm64, 
id:2D2B63DC-75C6-4522-92CF-4B325CA0479D, OS:26.2, name:iPad Pro 11-inch (M5) }
                { platform:iOS Simulator, arch:arm64, 
id:5EE77EED-19BD-4E3E-954E-EC3F5154E78A, OS:18.5, name:iPad Pro 13-inch (M4) }
                { platform:iOS Simulator, arch:x86_64, 
id:5EE77EED-19BD-4E3E-954E-EC3F5154E78A, OS:18.5, name:iPad Pro 13-inch (M4) }
                { platform:iOS Simulator, arch:arm64, 
id:E433B1A5-B48E-4C87-9441-7DE569ED1E3E, OS:26.2, name:iPad Pro 13-inch (M5) }
                { platform:iOS Simulator, arch:arm64, 
id:80A03BC4-A1B5-438A-BF53-9986E77E6742, OS:18.5, name:iPad mini (A17 Pro) }
                { platform:iOS Simulator, arch:x86_64, 
id:80A03BC4-A1B5-438A-BF53-9986E77E6742, OS:18.5, name:iPad mini (A17 Pro) }
                { platform:iOS Simulator, arch:arm64, 
id:ED8B3655-AA3B-426D-8F95-9A7BB744B0AE, OS:26.2, name:iPad mini (A17 Pro) }
                { platform:iOS Simulator, arch:arm64, 
id:0FD83FF6-8CD4-4007-BF1F-A7803E8A35BA, OS:18.5, name:iPhone 16 }
                { platform:iOS Simulator, arch:x86_64, 
id:0FD83FF6-8CD4-4007-BF1F-A7803E8A35BA, OS:18.5, name:iPhone 16 }
                { platform:iOS Simulator, arch:arm64, 
id:E8DF4860-A689-418F-A524-90AA745E9406, OS:18.5, name:iPhone 16 Plus }
                { platform:iOS Simulator, arch:x86_64, 
id:E8DF4860-A689-418F-A524-90AA745E9406, OS:18.5, name:iPhone 16 Plus }
                { platform:iOS Simulator, arch:arm64, 
id:3073BB72-7CAD-45BA-8F60-A295C4523654, OS:26.2, name:iPhone 16 Plus }
                { platform:iOS Simulator, arch:arm64, 
id:92928C2A-AB2B-44BE-9B8E-C29DF36B7A55, OS:18.5, name:iPhone 16 Pro }
                { platform:iOS Simulator, arch:x86_64, 
id:92928C2A-AB2B-44BE-9B8E-C29DF36B7A55, OS:18.5, name:iPhone 16 Pro }
                { platform:iOS Simulator, arch:arm64, 
id:E4D9D5C2-661E-4AA7-B31D-0D5079C002BD, OS:18.5, name:iPhone 16 Pro }
                { platform:iOS Simulator, arch:x86_64, 
id:E4D9D5C2-661E-4AA7-B31D-0D5079C002BD, OS:18.5, name:iPhone 16 Pro }
                { platform:iOS Simulator, arch:arm64, 
id:3FCD7184-4A9B-40E4-BAFF-C3F48AA82640, OS:18.5, name:iPhone 16 Pro Max }
                { platform:iOS Simulator, arch:x86_64, 
id:3FCD7184-4A9B-40E4-BAFF-C3F48AA82640, OS:18.5, name:iPhone 16 Pro Max }
                { platform:iOS Simulator, arch:arm64, 
id:575A39F0-5337-4007-BE51-946674FD8F96, OS:18.5, name:iPhone 16e }
                { platform:iOS Simulator, arch:x86_64, 
id:575A39F0-5337-4007-BE51-946674FD8F96, OS:18.5, name:iPhone 16e }
                { platform:iOS Simulator, arch:arm64, 
id:AA649FC2-8E71-4B18-930F-E85EA5E903A2, OS:26.2, name:iPhone 16e }
                { platform:iOS Simulator, arch:arm64, 
id:D6357C05-0F08-46F7-8EEE-43026BEFEA92, OS:26.2, name:iPhone 17 }
                { platform:iOS Simulator, arch:arm64, 
id:555DFD28-C8E6-47F0-AC47-7EE2D5FCC22F, OS:26.2, name:iPhone 17 Pro }
                { platform:iOS Simulator, arch:arm64, 
id:E07B36A6-6876-4E54-8ED1-74AB96359D71, OS:26.2, name:iPhone 17 Pro Max }
                { platform:iOS Simulator, arch:arm64, 
id:A20D9094-170E-4187-AD43-C5DEEF8F5B52, OS:26.2, name:iPhone Air }
   
        Ineligible destinations for the "App" scheme:
                { platform:visionOS, 
id:dvtdevice-DVTiOSDevicePlaceholder-xros:placeholder, name:Any visionOS 
Device, error:visionOS 26.2 is not installed. Please download and install the 
platform from Xcode > Settings > Components. }
   Command failed with exit code 70: xcodebuild -workspace App.xcworkspace 
-scheme App -configuration Debug -sdk iphonesimulator -destination platform=iOS 
Simulator,name=iPhone 16 Pro build
   ```
   
   When I tried to use the UUID like the following:
   
   ```bash
   cordova run ios --target=E4D9D5C2-661E-4AA7-B31D-0D5079C002BD 
   ```
   
   it says:
   
   ```
   Select last emulator from list as default.
   No simulator found for "E4D9D5C2-661E-4AA7-B31D-0D5079C002BD". Falling back 
to the default target.
   ```
   
   than it builds, but saying at the end
   
   ```
   Deploying to simulator
   Error: Device type 
"com.apple.CoreSimulator.SimDeviceType.E4D9D5C2-661E-4AA7-B31D-0D5079C002BD" 
could not be found.
   ```
   
   I asked Copilot in Visual Studio Code, what's happening and it changed the 
two files added to this PR. After that, the following do work:
   
   ```bash
   cordova run ios --target=E4D9D5C2-661E-4AA7-B31D-0D5079C002BD
   cordova run ios --target="iPhone-16-Pro, 18.5"
   cordova run ios --target="iPhone 16 Pro, 18.5"
   ```
   
   I noticed that I had `iPhone 16 Pro, 18.5` two times installed in XCode, but 
think, this was not the root cause of the problem. When I run this PR with two 
`iPhone 16 Pro, 18.5` installed:
   
   ```bash
   cordova run ios --target="iPhone-16-Pro, 18.5"   
   ```
   
   I get the following natural error:
   
   ```bash
   xcodebuild: error: Unable to find a device matching the provided destination 
specifier:
                { platform:iOS Simulator, OS:18.5, name:iPhone 16 Pro }
   
        The requested device could not be found because multiple devices 
matched the request. (
       "<DVTiPhoneSimulator: 0x83286c000> {\n\t\tSimDevice: iPhone 16 Pro 
(E4D9D5C2-661E-4AA7-B31D-0D5079C002BD, iOS 18.5, Booted)\n}",
       "<DVTiPhoneSimulator: 0x83286c280> {\n\t\tSimDevice: iPhone 16 Pro 
(0C7B1CB0-BED0-4DE2-A6CC-FC4CD471A114, iOS 18.5, Shutdown)\n}"
   )
   ```
   
   It shows the error because of `multiple devices matched the request`. I 
reviewed my console history and didn't find this error, before applying the 
changes.
   
   ### Description
   <!-- Describe your changes in detail -->
   
   
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   
   
   
   ### Checklist
   
   - [ ] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [ ] Commit is prefixed with `(platform)` if this change only applies to 
one platform (e.g. `(android)`)
   - [ ] If this Pull Request resolves an issue, I linked to the issue in the 
text above (and used the correct [keyword to close issues using 
keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [ ] I've updated the documentation if necessary
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to