cordova-ios icon indicating copy to clipboard operation
cordova-ios copied to clipboard

Improve --target and --list

Open janpio opened this issue 5 years ago • 2 comments

Feature Request

Motivation Behind Feature

--target and --list are currently one of the most iffy areas of cordova-ios. They use a unexpected format, that is also ambiguous which simulator really will be used.

Feature Description

  • Add a method that outputs the information about the simulator that will be used to emulate if not --target is specified
  • Output device ID
  • Allow targetting by device ID (Some times called "simulator hash")
  • Allow targetting by both formats, xcrun suimctl list and instruments -s devices

Alternatives or Workarounds

None

janpio avatar Apr 13 '19 19:04 janpio

Stumbled over this when trying to understand how cordova-paramedic tries to get the logs from the simulator. Turns out it runs cordova run --list --emulator, then greps and selects something from it, but also has to run instruments -s devices and parse stuff out of there trying to find a matching device ID. This usually works, until it doesn't which is super hard to understand and debug. Would make much more sense to let cordova-ios do the job for paramedic as well.

janpio avatar Apr 13 '19 19:04 janpio

Also worth noting is that the instruments command was deprecated in Xcode 12, and removed from Xcode 13. Running cordova-paramedic with Xcode 13 now crashes at "Filtering for Targeted Emulator".

Edit: xcrun xctrace list devices seems to be a good replacement, and is recommended by the deprecation warning when running instruments on Xcode 12:

`instruments` is now deprecated in favor of 'xcrun xctrace' (see `man xctrace` for more information on its replacement)

airdrummingfool avatar Sep 30 '21 16:09 airdrummingfool