Skip to content

Commit 5562020

Browse files
committed
adds updateBuildProperty for changing custom build settings
This method is very usefull since it allows changing custom build properties like TARGETED_DEVICE_FAMILY or IPHONEOS_DEPLOYMENT_TARGET This is going to be used in Apache Cordova for iOS platform
1 parent a429a59 commit 5562020

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/pbxProject.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,13 @@ pbxProject.prototype.buildPhaseObject = function (name, group) {
445445
return null;
446446
}
447447

448-
pbxProject.prototype.updateProductName = function(name) {
448+
pbxProject.prototype.updateBuildProperty = function(prop, value) {
449449
var config = this.pbxXCBuildConfigurationSection();
450-
propReplace(config, 'PRODUCT_NAME', '"' + name + '"');
450+
propReplace(config, prop, value);
451+
}
452+
453+
pbxProject.prototype.updateProductName = function(name) {
454+
this.updateBuildProperty('PRODUCT_NAME', '"' + name + '"');
451455
}
452456

453457
pbxProject.prototype.removeFromFrameworkSearchPaths = function (file) {

0 commit comments

Comments
 (0)