You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/01/03 15:19:26 UTC

[GitHub] janpio commented on a change in pull request #488: Replace ios-deploy with node-ios-device

janpio commented on a change in pull request #488: Replace ios-deploy with node-ios-device
URL: https://github.com/apache/cordova-ios/pull/488#discussion_r245031111
 
 

 ##########
 File path: bin/templates/scripts/cordova/lib/run.js
 ##########
 @@ -147,25 +146,42 @@ function filterSupportedArgs (args) {
  * Checks if any iOS device is connected
  * @return {Promise} Fullfilled when any device is connected, rejected otherwise
  */
-function checkDeviceConnected () {
-    return superspawn.spawn('ios-deploy', ['-c', '-t', '1'], { printCommand: true, stdio: 'inherit' });
+function checkDeviceConnected() {
+    return Q.Promise(function (resolve, reject) {
+        return iosDevice.devices(function (err, devices) {
+            if (err || !devices.length) {
+                return reject(err || new Error('no device connected'));
+            }
+            return resolve(devices[0].udid);
+        });
+    })
 }
 
 /**
  * Deploy specified app package to connected device
- * using ios-deploy command
+ * using node-ios-device
  * @param  {String} appPath Path to application package
  * @return {Promise}        Resolves when deploy succeeds otherwise rejects
  */
-function deployToDevice (appPath, target, extraArgs) {
 
 Review comment:
   What was `extraArgs` used for?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org