[
https://issues.apache.org/jira/browse/CB-13315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16178305#comment-16178305
]
Shazron Abdullah edited comment on CB-13315 at 9/27/17 9:02 AM:
----------------------------------------------------------------
The pull request listed above is fully currently being reviewed. The proposed
fix in the bug description is close, but the comment {{var self = this;}} and
{{var project = projectFile.parse(self.locations);}} fail with {{"root not
defined"}}. The working fix as submitted:
On line 29:
{code}
var projectFile = require('./projectFile');
{code}
on line 183:
{code}
var locations = {
root: projectPath,
pbxproj: path.join(projectPath, projectName, 'project.pbxproj')
};
var bundleIdentifier =
projectFile.parse(locations).getPackageName();
var exportOptions = {'compileBitcode': false, 'method':
'development'};
if (buildOpts.packageType) {
exportOptions.teamID = buildOpts.developmentTeam;
}
if (buildOpts.provisioningProfile && bundleIdentifier) {
exportOptions.provisioningProfiles = { [ bundleIdentifier ]:
String(buildOpts.provisioningProfile) };
exportOptions.signingStyle = 'manual';
}
if (buildOpts.codeSignIdentity) {
exportOptions.signingCertificate = buildOpts.codeSignIdentity;
}
{code}
was (Author: jrryhrtn):
The pull request listed above is fully currently being reviewed. The proposed
fix in the bug description is close, but the comment "var self = this;" and
"var project = projectFile.parse(self.locations);" fail with "root not
defined". The working fix as submitted:
On line 29:
var projectFile = require('./projectFile');
on line 183:
var locations = {
root: projectPath,
pbxproj: path.join(projectPath, projectName, 'project.pbxproj')
};
var bundleIdentifier =
projectFile.parse(locations).getPackageName();
var exportOptions = {'compileBitcode': false, 'method':
'development'};
if (buildOpts.packageType) {
exportOptions.teamID = buildOpts.developmentTeam;
}
if (buildOpts.provisioningProfile && bundleIdentifier) {
exportOptions.provisioningProfiles = { [ bundleIdentifier ]:
String(buildOpts.provisioningProfile) };
exportOptions.signingStyle = 'manual';
}
if (buildOpts.codeSignIdentity) {
exportOptions.signingCertificate = buildOpts.codeSignIdentity;
}
> XCode 9 fails export when using explicit provisioning profile and/or
> certificate
> --------------------------------------------------------------------------------
>
> Key: CB-13315
> URL: https://issues.apache.org/jira/browse/CB-13315
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-ios
> Environment: * XCode 9
> Reporter: Mark van Beek
> Assignee: Shazron Abdullah
> Priority: Blocker
>
> When building with explicit signing the build fails because the signing
> information is missing from the exportOptions.plist.
> A fix for this could be to update
> cordova-ios/bin/templates/scripts/cordova/lib/build.js with the following:
> add: {code:javascript}var projectFile = require('./projectFile');{code} on
> line 29
> add: {code:javascript}var self = this;{code} on line 58
> add:
> {code:javascript}
> var project = projectFile.parse(self.locations);
> var pkgName = project.getPackageName();
> if (pkgName && buildOpts.provisioningProfile) {
> exportOptions.provisioningProfiles = {[pkgName]:
> buildOpts.provisioningProfile};
> exportOptions.signingStyle = 'manual';
> }
> if (buildOpts.codeSignIdentity) {
> exportOptions.signingCertificate = buildOpts.codeSignIdentity;
> }
> {code}
> on line 141
> Line numbers refer to commit 7ab03155c2e44c94a0a284f32192ad6f264a6c0e
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]