Reputation: 2131
I am getting below message when crashing.
RCTTVNavigationEventEmitter
requires main queue setup since it overridesinit
but doesn't implementrequiresMainQueueSetup
. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
Code :
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];
Upvotes: 0
Views: 373
Reputation: 2131
There is a nil I found in the props due to that I was getting this error.
NSDictionary *props = @{@"bearer_token" : bearerToken ? bearerToken : @"bearer_token", @"area_id":SELECTED_AREA_ID};
Upvotes: 1