TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸

How to solve RCTBridge required dispatch_sync to load warning on iOS for React Native

September 4, 2021

The RCTBridge required dispatch_sync to load RCTDevLoadingView has become a common occurrence when developing React Native apps with version 0.64 and 0.65.

ss1

I came across this warning when installing packages like:

  • react-native-bootsplash
  • 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 #import "AppDelegate.h":

code
#import "AppDelegate.h"

// Add this
#if RCT_DEV
#import <React/RCTDevLoadingView.h>
#endif
// ---------------

Then, in the @implementation AppDelegate, before RCTRootView, add the following:

code
  #if RCT_DEV
    [bridge moduleForClass:[RCTDevLoadingView class]];
  #endif

  RCTRootView *rootView ...

Build the iOS app again by running:

code
yarn run ios

# or

npx react-native run-ios

The warning will be gone now.