I am trying to run my React Native app in XCode and I keep getting this error. I cannot figure out how to resolve the issue. Any suggestions?
Screen Shot of Error in
I had the same issue and I fixed it by placing RNFIRMessaging.h above the React/RCTBundleURLProvider.h
So it look I will look like:
#import "AppDelegate.h"
#import "RNFIRMessaging.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
click Product->Scheme->Manage Schemes->+ . and then add react as shared. also insure that your project name is there too.
Delete node modules, then run npm install
(or better yet yarn) and after everything has finished downloading, run react-native upgrade
which should give you the option to replace old files with the template ones, by doing so you re-link your native dependencies in react-native which should fix your problem. Of course don't forget to clean your project in Xcode.
Best Solution :
Open 'Build Settings' for your project in Xcode , search 'Header Search Path'.
Double click next to 'Header Search Path', where other properties have a 'yes' or 'no'
Now add following to the "Header Search Path" (under Build Settings):
$(SRCROOT)/../node_modules/react-native/React
$(SRCROOT)/../node_modules/react-native/React/Base
Don`t forget Make both of them recursive.
Try the following:
I tried all the suggestions and none of them worked at the i deleted the repo and clone it again and that work for me, so my suggestion is commit your changes back them up and clone the repo again that worked for me.