You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2016/11/08 19:26:54 UTC

ios commit: CB-12118 - Cordova run ios does not automatically deploy to device

Repository: cordova-ios
Updated Branches:
  refs/heads/master fa72583ea -> 4e88e35ff


CB-12118 - Cordova run ios does not automatically deploy to device

 This closes #274


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/4e88e35f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/4e88e35f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/4e88e35f

Branch: refs/heads/master
Commit: 4e88e35ff912ab1f716f9e6a102f4d7ce29d328a
Parents: fa72583
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Nov 7 16:41:15 2016 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Nov 8 11:28:07 2016 -0800

----------------------------------------------------------------------
 bin/templates/scripts/cordova/lib/build.js | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4e88e35f/bin/templates/scripts/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/build.js b/bin/templates/scripts/cordova/lib/build.js
index a26f198..1acf942 100644
--- a/bin/templates/scripts/cordova/lib/build.js
+++ b/bin/templates/scripts/cordova/lib/build.js
@@ -84,7 +84,17 @@ module.exports.run = function (buildOpts) {
         }
     }
 
-    return check_reqs.run().then(function () {
+return require('./list-devices').run()
+   .then(function (devices) {
+        if (devices.length > 0 && !(buildOpts.emulator)) {
+            // we also explicitly set device flag in options as we pass
+            // those parameters to other api (build as an example)
+            buildOpts.device = true;
+            return check_reqs.check_ios_deploy();
+        }
+    }).then(function () {
+        return check_reqs.run();
+    }).then(function () {
         return findXCodeProjectIn(projectPath);
     }).then(function (name) {
         projectName = name;


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