gpt4 book ai didi

react-native - RCTBridge 需要 dispatch_sync 来加载 RCTDevLoadingView

转载 作者:行者123 更新时间:2023-12-04 12:11:33 25 4
gpt4 key购买 nike

我正处于 react-native 的学习阶段。当我在模拟器上运行我的应用程序时,我收到以下警告,但如何调试此错误?我不确定要检查什么以及在哪里检查以摆脱此错误,有人可以指导我吗?我在 iOS 模拟器上运行。
enter image description here

最佳答案

我能够通过更新 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];

}

关于react-native - RCTBridge 需要 dispatch_sync 来加载 RCTDevLoadingView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62790300/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com