cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From surajpindo...@apache.org
Subject [cordova-ios] branch master updated: CB-13315: (ios) fixed bug building for ios using Xcode 9
Date Wed, 27 Sep 2017 23:12:25 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new cf424b4  CB-13315: (ios) fixed bug building for ios using Xcode 9
cf424b4 is described below

commit cf424b46fb37c00395c1ee9a249280efee5f65b5
Author: Horton <irhppe@SPA-MAC-PHTD6.local>
AuthorDate: Fri Sep 22 21:14:35 2017 -0500

    CB-13315: (ios) fixed bug building for ios using Xcode 9
---
 bin/templates/scripts/cordova/lib/build.js | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/bin/templates/scripts/cordova/lib/build.js b/bin/templates/scripts/cordova/lib/build.js
index fcc10c3..f51b084 100644
--- a/bin/templates/scripts/cordova/lib/build.js
+++ b/bin/templates/scripts/cordova/lib/build.js
@@ -26,6 +26,7 @@ var plist = require('plist');
 var util = require('util');
 
 var check_reqs = require('./check_reqs');
+var projectFile = require('./projectFile');
 
 var events = require('cordova-common').events;
 
@@ -96,7 +97,7 @@ module.exports.run = function (buildOpts) {
             var buildType = buildOpts.release ? 'release' : 'debug';
             var config = buildConfig.ios[buildType];
             if (config) {
-                ['codeSignIdentity', 'codeSignResourceRules', 'provisioningProfile', 'developmentTeam',
'packageType', 'buildFlag'].forEach(
+                ['codeSignIdentity', 'codeSignResourceRules', 'provisioningProfile', 'developmentTeam',
'packageType', 'buildFlag', 'iCloudContainerEnvironment'].forEach(
                     function (key) {
                         buildOpts[key] = buildOpts[key] || config[key];
                     });
@@ -179,16 +180,35 @@ module.exports.run = function (buildOpts) {
                 return;
             }
 
+            var locations = {
+                root: projectPath,
+                pbxproj: path.join(projectPath, projectName + '.xcodeproj', 'project.pbxproj')
+            };
+
+            var bundleIdentifier = projectFile.parse(locations).getPackageName();
             var exportOptions = {'compileBitcode': false, 'method': 'development'};
 
             if (buildOpts.packageType) {
                 exportOptions.method = buildOpts.packageType;
             }
 
+            if (buildOpts.iCloudContainerEnvironment) {
+                exportOptions.iCloudContainerEnvironment = buildOpts.iCloudContainerEnvironment;
+            }
+
             if (buildOpts.developmentTeam) {
                 exportOptions.teamID = buildOpts.developmentTeam;
             }
 
+            if (buildOpts.provisioningProfile && bundleIdentifier) {
+                exportOptions.provisioningProfiles = { [ bundleIdentifier ]: String(buildOpts.provisioningProfile)
};
+                exportOptions.signingStyle = 'manual';
+            }
+
+            if (buildOpts.codeSignIdentity) {
+                exportOptions.signingCertificate = buildOpts.codeSignIdentity;
+            }
+
             var exportOptionsPlist = plist.build(exportOptions);
             var exportOptionsPath = path.join(projectPath, 'exportOptions.plist');
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@cordova.apache.org" <commits@cordova.apache.org>'].

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


Mime
View raw message