Open colbymelvin opened 4 years ago
When running cordova emulate ios without a target, the deployToSim method just picks the last iPhone emulator specified by listEmulatorImages.
cordova emulate ios
deployToSim
listEmulatorImages
This can be burdensome on a machine with lots of installed images for varying iOS versions.
When not specifying a target, I would expect cordova emulate ios to prioritize by SDK version when possible.
Given the following list of emulator images, I would expect the first 13.X image found to take precedence and be used as the default target:
iPhone-8, 13.4 ... iPhone-8-Plus, 13.4 ... iPhone-11, 13.4 ... iPhone-11-Pro, 13.4 ... iPhone-11-Pro-Max, 13.4 ... iPhone-SE--2nd-generation-, 13.4 iPhone-5s, 11.4 ... iPhone-6-Plus, 11.4 ... iPhone-6, 11.4 ... iPhone-6s, 11.4 ... iPhone-6s-Plus, 11.4 ... iPhone-SE, 11.4 ... iPhone-7, 11.4 ... iPhone-7-Plus, 11.4 ... iPhone-X, 11.4 ... iPhone-XS, 12.0 ... iPhone-XS-Max, 12.0 ... iPhone-XR, 12.1
Given the following list of emulator images, the last iPhone emulator image is used (iPhone-XR, 12.1):
iPhone-XR, 12.1
I am willing to work on and submit a PR for this -- LMK!
Bug Report
Problem
When running
cordova emulate ios
without a target, thedeployToSim
method just picks the last iPhone emulator specified bylistEmulatorImages
.This can be burdensome on a machine with lots of installed images for varying iOS versions.
What is expected to happen?
When not specifying a target, I would expect
cordova emulate ios
to prioritize by SDK version when possible.Given the following list of emulator images, I would expect the first 13.X image found to take precedence and be used as the default target:
What does actually happen?
Given the following list of emulator images, the last iPhone emulator image is used (
iPhone-XR, 12.1
):Information
Command or Code
Environment, Platform, Device
Version information
Checklist