I get this in logs:
RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks
This is leading to
I fixed it with updating AppDelegate.m
as below:
#if RCT_DEV #import <React/RCTDevLoadingView.h> #endif ... - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ... RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation moduleProvider:nil launchOptions:launchOptions]; #if RCT_DEV [bridge moduleForClass:[RCTDevLoadingView class]]; #endif RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"<AddYourAppNameHere>" initialProperties:nil]; ... }
Source: devburmistro's answer Dec 10, 2017 from: https://github.com/facebook/react-native/issues/16376
Swift Solution
let bridge = RCTBridge(bundleURL: jsCodeLocation, moduleProvider: nil, launchOptions: nil)
#if RCT_DEV
bridge?.module(for: RCTDevLoadingView.self)
#endif
let rootView = RCTRootView(bridge: bridge!, moduleName: "AppMain", initialProperties: nil)