From 70405ecbf5ffb83c2821a80bc59a3699b33b2980 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Sun, 2 Aug 2020 01:58:00 +0800 Subject: [PATCH] doc: Update README.md --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 251f4e6..8578ba8 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,34 @@ https://uiwjs.github.io/react-native-wechat/apple-app-site-association +
+iOS: RCTBridge required dispatch_sync to load RCTDevLoadingView. + +> 错误内容: RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks + +**错误解决方案**:可以通过下面代码可以解决,事实上我通过关闭 debug 浏览器页面就没有错误消息了。错误原因可能是你打开了 debug 浏览器,但是你模拟器并没有开启 debug 模式。 + +```diff ++ #if RCT_DEV ++ #import ++ #endif + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ +#ifdef FB_SONARKIT_ENABLED + InitializeFlipper(application); +#endif + + RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; + ++ #if RCT_DEV ++ [bridge moduleForClass:[RCTDevLoadingView class]]; ++ #endif + RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"example" initialProperties:nil]; +``` + +
+ ## 安装依赖 ```bash