You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2014/09/05 20:14:43 UTC
[38/50] git commit: CB-7118 Use updated version of node-xcode
CB-7118 Use updated version of node-xcode
Conflicts:
cordova-lib/src/cordova/metadata/ios_parser.js
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/867a01ef
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/867a01ef
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/867a01ef
Branch: refs/heads/master
Commit: 867a01ef945d96bf8d86176162f9efa3caae51bb
Parents: db00cdc
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Aug 20 10:49:05 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/package.json | 2 +-
cordova-lib/src/cordova/metadata/ios_parser.js | 22 +++++----------------
2 files changed, 6 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/867a01ef/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 6bffa4d..1d8ab81 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -34,7 +34,7 @@
"shelljs": "0.1.x",
"tar": "0.1.x",
"underscore": "1.4.4",
- "xcode": "0.6.6",
+ "xcode": "0.6.7",
"cordova-js": "3.x.x",
"unorm": ">=1.3"
},
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/867a01ef/cordova-lib/src/cordova/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/ios_parser.js b/cordova-lib/src/cordova/metadata/ios_parser.js
index f43f194..19b63e8 100644
--- a/cordova-lib/src/cordova/metadata/ios_parser.js
+++ b/cordova-lib/src/cordova/metadata/ios_parser.js
@@ -239,14 +239,13 @@ module.exports.prototype = {
d.reject(new Error('An error occured during parsing of project.pbxproj. Start weeping. Output: ' + err));
return;
}
- var buildConfiguration = proj.pbxXCBuildConfigurationSection();
if (targetDevice) {
- // TODO: replace propReplace with proj.updateBuildProperty after below is release
- // https://github.com/alunny/node-xcode/pull/33
- propReplace(buildConfiguration, 'TARGETED_DEVICE_FAMILY', targetDevice);
+ events.emit('verbose', 'Set TARGETED_DEVICE_FAMILY to ' + targetDevice + '.');
+ proj.updateBuildProperty('TARGETED_DEVICE_FAMILY', targetDevice);
}
if (deploymentTarget) {
- propReplace(buildConfiguration, 'IPHONEOS_DEPLOYMENT_TARGET', deploymentTarget);
+ events.emit('verbose', 'Set IPHONEOS_DEPLOYMENT_TARGET to "' + deploymentTarget + '".');
+ proj.updateBuildProperty('IPHONEOS_DEPLOYMENT_TARGET', deploymentTarget);
}
fs.writeFileSync(me.pbxproj, proj.writeSync(), 'utf-8');
d.resolve();
@@ -261,6 +260,7 @@ module.exports.prototype = {
function default_CFBundleVersion(version) {
return version.split('-')[0];
}
+
// Converts cordova specific representation of target device to XCode value
function parseTargetDevicePreference(value) {
if (!value) return null;
@@ -271,15 +271,3 @@ function parseTargetDevicePreference(value) {
events.emit('warn', 'Unknown target-device preference value: "' + value + '".');
return null;
}
-// helper recursive prop search+replace
-function propReplace(obj, prop, value) {
- for (var p in obj) {
- if (obj.hasOwnProperty(p)) {
- if (typeof obj[p] == 'object') {
- propReplace(obj[p], prop, value);
- } else if (p == prop) {
- obj[p] = value;
- }
- }
- }
-}