More logging for simulator selection and deployment#596
Conversation
Codecov Report
@@ Coverage Diff @@
## master #596 +/- ##
==========================================
- Coverage 74.58% 74.24% -0.34%
==========================================
Files 11 11
Lines 1826 1833 +7
==========================================
- Hits 1362 1361 -1
- Misses 464 472 +8
Continue to review full report at Codecov.
|
raphinesse
left a comment
There was a problem hiding this comment.
LGTM 👍. Just two tiny remarks. Please feel free to disagree
|
One other minor thing: would be nice if the paths for the ios-sim logging were relative to the project. That would improve readability but it could be more trouble than it's worth too |
|
The apppath and iossim binary? I didn't touch those, and assumed there was a reason for the absolute paths here :/ |
Yes, and the log path. That might well be the case. It's safest to use absolute paths but it should™ also work with relative paths since you cwd to the project dir. But you never know that they don't mess up in ios-sim. And we would need three extra lines just to have prettier paths for logging... |
|
Thanks for the feedback, incorporated the one I understood. Please feel free to edit the files yourself to get this ready to merge (as I won't be available the next few days). |
|
Okay, if the tests (eventually) pass, let's merge this as-is and ship it in 5.0.1. |
|
Thanks for the cleanup @dpogue! |
Motivation and Context
Currently the simulator selection and app deployment on the selected simulator is a bit of a black box, the logging is insufficient to properly understand and retrace what is happening.
Description
xcodebuildcommand, output theemulatorTargetthat will be used as part of-destinationoption:Deploying to simulatorios-simRunning command: /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp-2604oc4wBu2VePt9/node_modules/ios-sim/bin/ios-sim launch /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp-2604oc4wBu2VePt9/platforms/ios/build/emulator/HelloCordova.app --devicetypeid com.apple.CoreSimulator.SimDeviceType.iPhone-XR --log /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp-2604oc4wBu2VePt9/platforms/ios/cordova/console.log --exitios-simwithios-sim log:for context:ios-simand fail (instead of hanging):(Related: The output this creates would benefit from changes to
ios-sim: ios-control/ios-sim#255 + ios-control/ios-sim#256 (8.x))Testing
This has been used in
cordova-paramedicto better understand cordova-ios behaviour and uncover a few problems around simulator selection and deployment.Checklist