Browse Source

fixed storyboard crash

yogevbd 6 years ago
parent
commit
56dcc9b5c8
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      ios/RCCManager.m

+ 5
- 5
ios/RCCManager.m View File

216
     return nil;
216
     return nil;
217
   }
217
   }
218
   
218
   
219
-  UIStoryboard* storyboard = [UIStoryboard storyboardWithName:launchStoryboardName bundle:nil];
220
-  if (storyboard == nil)
221
-  {
219
+  @try {
220
+    UIStoryboard* storyboard = [UIStoryboard storyboardWithName:launchStoryboardName bundle:nil];
221
+    return storyboard.instantiateInitialViewController;
222
+  }
223
+  @catch(NSException *exception) {
222
     return nil;
224
     return nil;
223
   }
225
   }
224
-  
225
-  return storyboard.instantiateInitialViewController;
226
 }
226
 }
227
 
227
 
228
 + (UIViewController *)viewControllerFromLaunchNibForScreenBounds:(CGRect)screenBounds
228
 + (UIViewController *)viewControllerFromLaunchNibForScreenBounds:(CGRect)screenBounds