Search code examples
reactjsxcodereact-nativesplash-screen

React/RCTBridgeModule.h file not found RNSSplashScreen


When configuring React Native Splash Screen i get the following Error 'React/RCTBridgeModule.h' file not found. I have looked at solutions online but i have not managed to find a clear solution.

I have tried a few solutions online, and i have gone over the steps in the Splash screen documentation but to no avail. The error appears in RNSplashScreen.h

enter image description here

I am using React native 6.0+


Solution

  • $ npm i react-native-splash-screen --save
    $ cd ./ios
    $ pod update
    You don't need to do react-native link on XCode 11 beta + RN >= 0.60
    And 'Do Not' add the libSplashScreen.a library to Link Binary With Libraries since this will cause the 'Duplicate Symbol Error'.
    And go to AppDelegate.m and import the header as follows
    #import <react-native-splash-screen/RNSplashScreen.h>
    instead of
    #import "RNSplashScreen.h"
    

    Obtained from the following Link

    https://github.com/crazycodeboy/react-native-splash-screen/issues/215