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-19694] Added support for launch screen storyboards for iOS 9 #7412

Merged
merged 17 commits into from Dec 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
6 changes: 3 additions & 3 deletions android/cli/commands/_build.js
Expand Up @@ -999,7 +999,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
}

// check that the proguard config exists
var proguardConfigFile = path.join(cli.argv['project-dir'], cli.argv['platform-dir'] || 'platform', 'android', 'proguard.cfg');
var proguardConfigFile = path.join(cli.argv['project-dir'], 'platform', 'android', 'proguard.cfg');
if (this.proguard && !fs.existsSync(proguardConfigFile)) {
logger.error(__('Missing ProGuard configuration file'));
logger.error(__('ProGuard settings must go in the file "%s"', proguardConfigFile));
Expand All @@ -1024,7 +1024,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
}

try {
var customAndroidManifestFile = path.join(cli.argv['project-dir'], cli.argv['platform-dir'] || 'platform', 'android', 'AndroidManifest.xml');
var customAndroidManifestFile = path.join(cli.argv['project-dir'], 'platform', 'android', 'AndroidManifest.xml');
this.customAndroidManifest = fs.existsSync(customAndroidManifestFile) && (new AndroidManifest(customAndroidManifestFile));
} catch (ex) {
logger.error(__('Malformed custom AndroidManifest.xml file: %s', customAndroidManifestFile) + '\n');
Expand Down Expand Up @@ -2498,7 +2498,7 @@ AndroidBuilder.prototype.copyResources = function copyResources(next) {
this.modules.forEach(function (module) {
platformPaths.push(path.join(module.modulePath, 'platform', 'android'));
});
platformPaths.push(path.join(this.projectDir, this.cli.argv['platform-dir'] || 'platform', 'android'));
platformPaths.push(path.join(this.projectDir, 'platform', 'android'));
platformPaths.forEach(function (dir) {
if (fs.existsSync(dir)) {
tasks.push(function (cb) {
Expand Down
4 changes: 3 additions & 1 deletion cli/commands/build.js
Expand Up @@ -154,6 +154,8 @@ exports.config = function (logger, config, cli) {
return;
}

cli.scanHooks(path.join(projectDir, 'hooks'));

return projectDir;
},
desc: __('the directory containing the project'),
Expand Down Expand Up @@ -400,7 +402,7 @@ function patchLogger(logger, cli) {
fs.existsSync(buildDir) || wrench.mkdirSyncRecursive(buildDir, 0766);

// create our write stream
logger.log.filestream = fs.createWriteStream(path.join(buildDir, 'build_' + platform + '.log'), { 'flags': 'w', 'encoding': 'ascii', 'mode': 0666 });
logger.log.filestream = fs.createWriteStream(path.join(buildDir, 'build_' + platform + '.log'), { 'flags': 'w', 'encoding': 'utf8', 'mode': 0666 });

function styleHeading(s) {
return ('' + s).bold;
Expand Down
22 changes: 18 additions & 4 deletions iphone/Classes/TiRootViewController.m
Expand Up @@ -122,9 +122,11 @@ - (id) init
* the view will be unloaded (by, perhaps a Memory warning while a modal view
* controller and loaded at a later time.
*/
defaultImageView = [[UIImageView alloc] init];
[defaultImageView setAutoresizingMask:UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth];
[defaultImageView setContentMode:UIViewContentModeScaleToFill];
if ([[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending) {
defaultImageView = [[UIImageView alloc] init];
[defaultImageView setAutoresizingMask:UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth];
[defaultImageView setContentMode:UIViewContentModeScaleToFill];
}

[self processInfoPlist];

Expand Down Expand Up @@ -209,7 +211,19 @@ - (void)remoteControlReceivedWithEvent:(UIEvent *)event
-(void)updateBackground
{
UIView * ourView = [self view];
UIColor * chosenColor = (bgColor==nil)?[UIColor blackColor]:bgColor;
UIColor * chosenColor = bgColor;

if (chosenColor == nil) {
#if defined(DEFAULT_BGCOLOR_RED) && defined(DEFAULT_BGCOLOR_GREEN) && defined(DEFAULT_BGCOLOR_BLUE)
chosenColor = [UIColor colorWithRed: DEFAULT_BGCOLOR_RED
green: DEFAULT_BGCOLOR_GREEN
blue: DEFAULT_BGCOLOR_BLUE
alpha: 1.0f];
#else
chosenColor = [UIColor blackColor];
#endif
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If bgColor is not nil, it will not be assigned here. Is that intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean. chosenColor is either bgColor or black. If bgColor is nil, then chosenColor is nil. If chosenColor is nil, then we used to set it to black, but now we check if the colors are defined otherwise fallback to black. The code is good. Not sure what your concern is.


[ourView setBackgroundColor:chosenColor];
[[ourView superview] setBackgroundColor:chosenColor];
if (bgImage!=nil)
Expand Down