0

I am getting below message when crashing.

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.

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];
1
  • Your question has too little information. Please add more details. For example, are you using Expo? When did this error start occuring (added a new module, from first run, etc.)? etc. Commented Nov 22, 2017 at 9:38

1 Answer 1

1

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};
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.