From 49ef4adad32767ee70da43e47e8df4ecdbfd028a Mon Sep 17 00:00:00 2001 From: KyleWong Date: Thu, 13 Sep 2018 12:08:01 +0800 Subject: [PATCH] Fix a crash when UILaunchStoryboardName is not specified in Info.plist (#6234) Some developers might prefer launch images. --- .../darwin/ios/framework/Source/FlutterViewController.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 26c8ffc3284..f90d2862eaf 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -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;