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 2019/01/10 07:48:48 UTC

[cordova-ios] 01/01: Fixes $(PRODUCT_BUNDLE_IDENTIFIER) not being resolved for a product archive

This is an automated email from the ASF dual-hosted git repository.

shazron pushed a commit to branch shazron-patch-1
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git

commit df5176114f4304b93362c1176e3198acffbc6545
Author: Shazron Abdullah <sh...@adobe.com>
AuthorDate: Thu Jan 10 15:48:40 2019 +0800

    Fixes $(PRODUCT_BUNDLE_IDENTIFIER) not being resolved for a product archive
---
 bin/templates/scripts/cordova/lib/build.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/bin/templates/scripts/cordova/lib/build.js b/bin/templates/scripts/cordova/lib/build.js
index 80a6111..2bdc08c 100644
--- a/bin/templates/scripts/cordova/lib/build.js
+++ b/bin/templates/scripts/cordova/lib/build.js
@@ -183,7 +183,15 @@ module.exports.run = function (buildOpts) {
                 pbxproj: path.join(projectPath, projectName + '.xcodeproj', 'project.pbxproj')
             };
 
-            var bundleIdentifier = projectFile.parse(locations).getPackageName();
+            var project = projectFile.parse(locations);
+            var packageName = project.getPackageName();
+            var bundleIdentifier = packageName;
+
+            var variables = packageName.match(/\$\((\w+)\)/) // match $(VARIABLE), if any
+            if (variables && variables.length >=2) {
+                bundleIdentifier = project.xcode.getBuildProperty(variables[1]);
+            }
+
             var exportOptions = {'compileBitcode': false, 'method': 'development'};
 
             if (buildOpts.packageType) {


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