RCTBridge require dispatch_sync to load RCTDevLoadingView

Viewed 6289

I am in my learning phase of react-native. When I run my app on simulator, I get the following warning, but how to debug this error? I am not sure what and where to check to get rid of this error, could someone please guide me a bit? I am running on iOS simulator.

enter image description here

1 Answers

I was able to workaround the warning by updating AppDelegate.m

#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:@"Test"
                                            initialProperties:nil];
  
}

Related