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-16652] Fixed bug when running an ios build for all connected devi... #5541

Merged
merged 2 commits into from
Apr 1, 2014
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
42 changes: 22 additions & 20 deletions iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,27 +873,29 @@ iOSBuilder.prototype.validate = function (logger, config, cli) {
// args based on the sim profile values
if ((this.target == 'device' || this.target == 'simulator') && deviceId) {
for (var i = 0, l = this.devices.length; i < l; i++) {
if (this.devices[i].id == deviceId) {
if (this.target == 'device') {
if (this.devices[i].id != 'itunes' && version.lt(this.devices[i].productVersion, this.minIosVer)) {
logger.error(__('This app does not support the device "%s"', this.devices[i].name) + '\n');
logger.log(__("The device is running iOS %s, however the app's the minimum iOS version is set to %s", this.devices[i].productVersion.cyan, version.format(this.minIosVer, 2, 3).cyan));
logger.log(__('In order to install this app on this device, lower the %s to %s in the tiapp.xml:', '<min-ios-ver>'.cyan, version.format(this.devices[i].productVersion, 2, 2).cyan));
logger.log();
logger.log('<ti:app xmlns:ti="http://ti.appcelerator.org">'.grey);
logger.log(' <ios>'.grey);
logger.log((' <min-ios-ver>' + version.format(this.devices[i].productVersion, 2, 2) + '</min-ios-ver>').magenta);
logger.log(' </ios>'.grey);
logger.log('</ti:app>'.grey);
logger.log();
process.exit(0);
}
} else if (this.target == 'simulator') {
cli.argv.retina = !!this.devices[i].retina;
cli.argv.tall = !!this.devices[i].tall;
cli.argv['sim-64bit'] = !!this.devices[i]['64bit'];
cli.argv['sim-type'] = this.devices[i].type;
if (this.target == 'device') {
if (this.devices[i].id == 'all' || this.devices[i].id == 'itunes') {
continue;
}

if ((deviceId == 'all' || deviceId == this.devices[i].id) && version.lt(this.devices[i].productVersion, this.minIosVer)) {
logger.error(__('This app does not support the device "%s"', this.devices[i].name) + '\n');
logger.log(__("The device is running iOS %s, however the app's the minimum iOS version is set to %s", this.devices[i].productVersion.cyan, version.format(this.minIosVer, 2, 3).cyan));
logger.log(__('In order to install this app on this device, lower the %s to %s in the tiapp.xml:', '<min-ios-ver>'.cyan, version.format(this.devices[i].productVersion, 2, 2).cyan));
logger.log();
logger.log('<ti:app xmlns:ti="http://ti.appcelerator.org">'.grey);
logger.log(' <ios>'.grey);
logger.log((' <min-ios-ver>' + version.format(this.devices[i].productVersion, 2, 2) + '</min-ios-ver>').magenta);
logger.log(' </ios>'.grey);
logger.log('</ti:app>'.grey);
logger.log();
process.exit(0);
}
} else if (this.target == 'simulator' && this.devices[i].id == deviceId) {
cli.argv.retina = !!this.devices[i].retina;
cli.argv.tall = !!this.devices[i].tall;
cli.argv['sim-64bit'] = !!this.devices[i]['64bit'];
cli.argv['sim-type'] = this.devices[i].type;
break;
}
}
Expand Down