“RCTBundleURLProvider.h” file not found - AppDelegate.m

后端 未结 26 1343
遇见更好的自我
遇见更好的自我 2020-12-04 06:29

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

相关标签:
26条回答
  • 2020-12-04 07:14

    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>
    
    0 讨论(0)
  • 2020-12-04 07:15

    click Product->Scheme->Manage Schemes->+ . and then add react as shared. also insure that your project name is there too.

    0 讨论(0)
  • 2020-12-04 07:16

    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.

    0 讨论(0)
  • 2020-12-04 07:18

    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.

    0 讨论(0)
  • 2020-12-04 07:18

    Try the following:

    1. Clean (cmd+shift+K).
    2. Build core React - select React as the scheme in Xcode and build it (cmd+B).
    3. Build the library that is failing (e.g. RCTText).
    4. Build your app.
    0 讨论(0)
  • 2020-12-04 07:18

    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.

    0 讨论(0)
提交回复
热议问题