From 60ac4f0fe3f9e1cb9cf5fb41c6d716c4425b585c 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 (flutter/engine#6234) Some developers might prefer launch images. --- .../darwin/ios/framework/Source/FlutterViewController.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 26c8ffc328..f90d2862ea 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/engine/src/flutter/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;