How to solve RCTBridge required dispatch_sync to load warning on iOS for React Native
Published on Sep 4, 2021
1 min read
The RCTBridge required dispatch_sync to load RCTDevLoadingView has become a common occurence when developing React Native apps with version
I came across this warning when installing packages like:
- react-navigation v6
Recently, I came across an open issue on github.com/facebook/react-native that contains the following resolution for this.
Open the file
./ios/AppName/AppDelegate.m. First, add the following just after the import statement
1#import "AppDelegate.h"23// Add this4#if RCT_DEV5#import <React/RCTDevLoadingView.h>6#endif7// ---------------
Then, in the
@implementation AppDelegate, before
RCTRootView, add the following:
1 #if RCT_DEV2 [bridge moduleForClass:[RCTDevLoadingView class]];3 #endif45 RCTRootView *rootView ...
Build the iOS app again by running:
yarn run ios# ornpx react-native run-ios
The warning will be gone now.
Browse all posts
I'm a software developer and a technical writer. In this blog, I write about Technical writing, Node.js, React Native and Expo.
Currently, working at Expo. Previously, I've worked as a Developer Advocate, and Senior Content Developer with companies like Draftbit and Vercel.