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.
Asked
Active
Viewed 6,551 times
6
-
Does this answer your question? [RCTBridge required dispatch\_sync to load RCTDevLoadingView. This may lead to deadlocks](https://stackoverflow.com/questions/45988103/rctbridge-required-dispatch-sync-to-load-rctdevloadingview-this-may-lead-to-dea) – nima Oct 25 '20 at 04:49
1 Answers
14
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];
}

Muhammad Numan
- 23,222
- 6
- 63
- 80