Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-24241] Fixed missing Info.plist for dist-appstore builds. #8699

Merged
merged 2 commits into from
Dec 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 26 additions & 1 deletion iphone/cli/hooks/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ exports.init = function (logger, config, cli) {
case 'dist-appstore':
logger.info(__('Preparing xcarchive'));

var name = builder.tiapp.name;

var stagingArchiveDir = path.join(builder.buildDir, 'staging.xcarchive');
if (!fs.existsSync(stagingArchiveDir)) {
return finished(new Error(__('Staging archive directory does not exist')));
Expand Down Expand Up @@ -80,8 +82,31 @@ exports.init = function (logger, config, cli) {
}
});

var name = builder.tiapp.name;
var now = new Date;
var destInfoPlist = path.join(stagingArchiveDir, 'Info.plist');
if (!fs.existsSync(destInfoPlist)) {
var origPlist = new appc.plist(path.join(builder.buildDir, 'Info.plist'));
var newPlist = new appc.plist();
var appBundle = 'Applications/' + name + '.app';

appc.util.mix(newPlist, {
ApplicationProperties: {
ApplicationPath: appBundle,
CFBundleIdentifier: origPlist.CFBundleIdentifier || builder.tiapp.id,
CFBundleShortVersionString: origPlist.CFBundleShortVersionString || '1.0',
CFBundleVersion: origPlist.CFBundleVersion || '1.0',
SigningIdentity: 'iPhone Distribution: ' + builder.certDistributionName,
IconPaths: [
appBundle + '/' + builder.tiapp.icon
]
},
ArchiveVersion: newPlist.type('integer', 2),
CreationDate: now,
Name: name,
SchemeName: name
}).save(destInfoPlist);
}

var month = now.getMonth() + 1;
var day = now.getDate();
var hours = now.getHours();
Expand Down