From e6a9f209345e3a923e556ff368e082f58a95904f Mon Sep 17 00:00:00 2001 From: Beng Tan Date: Fri, 26 Jul 2019 14:37:39 +0800 Subject: [PATCH] Work-around: Avoid rn-splash-screen triggering bg crash. See: https://github.com/crazycodeboy/react-native-splash-screen/issues/397 https://github.com/crazycodeboy/react-native-splash-screen/pull/234#issuecomment-408482899 --- ios/TinyRobot/AppDelegate.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/TinyRobot/AppDelegate.m b/ios/TinyRobot/AppDelegate.m index 3f61065b6..535ac375c 100644 --- a/ios/TinyRobot/AppDelegate.m +++ b/ios/TinyRobot/AppDelegate.m @@ -88,6 +88,8 @@ -(void)loadBundle:(NSDictionary *)launchOptions initialProps:(NSDictionary *)pro self.window.rootViewController = rootViewController; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; + + [RNSplashScreen showSplash:@"LaunchScreen" inRootView:rootView]; } - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { @@ -99,7 +101,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[UITextField appearance] setTintColor:[UIColor lightGrayColor]]; [self loadBundle:launchOptions initialProps:env]; - [RNSplashScreen show]; return YES; }