gpt4 book ai didi

ios - 在启动崩溃应用程序时 react native 代码

转载 作者:行者123 更新时间:2023-11-29 00:08:01 27 4
gpt4 key购买 nike

我在崩溃时收到以下消息。

RCTTVNavigationEventEmitter requires main queue setup since it overrides init but doesn't implement requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.

代码:

NSString *bearerToken = REQUESTS.oAuthRequest.accessToken;
NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"home.ios" fallbackResource:nil];

RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation moduleProvider:nil launchOptions:nil];
NSDictionary *props = @{@"bearer_token" : bearerToken, @"area_id":SELECTED_AREA_ID};
rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"Order" initialProperties:props];
rootView.frame = CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT - 112);
[self.view addSubview:rootView];

最佳答案

由于出现此错误,我在 props 中发现了一个 nil。

NSDictionary *props = @{@"bearer_token" : bearerToken ? bearerToken : @"bearer_token", @"area_id":SELECTED_AREA_ID};

关于ios - 在启动崩溃应用程序时 react native 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47429256/

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