Fix a crash when UILaunchStoryboardName is not specified in Info.plist (#6234)

Some developers might prefer launch images.
This commit is contained in:
KyleWong 2018-09-13 12:08:01 +08:00 committed by James D. Lin
parent 2a433bc685
commit 49ef4adad3

View File

@ -392,6 +392,9 @@
if (_splashScreenView == nullptr) {
NSString* launchStoryboardName =
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"UILaunchStoryboardName"];
if (launchStoryboardName == nil) {
return nil;
}
UIStoryboard* storyboard = [UIStoryboard storyboardWithName:launchStoryboardName bundle:nil];
if (storyboard == nil) {
return nil;