9

I am getting following error with react native version 0.40.0 version React/RCTBundleURLProvider.h' file not found.

I tried deleting node modules , installing it with npm install and clearing watchman.multiple times. But still not able to get it working.

AK2016
  • 149
  • 1
  • 2
  • 8
  • Possible duplicate http://stackoverflow.com/questions/40368211/rctbundleurlprovider-h-file-not-found-appdelegate-m/43007066#43007066 – Hariks Mar 24 '17 at 18:51

2 Answers2

5

Got it working by dropping the default target on XCode and recreating it again.

Also, make sure to check Manage Schemes > [select your main target] > Edit > Build tab.

Xcode Schemes

Check that React is in the list, and mark the scheme as Shared. Otherwise, it will be saved in your user's folder and GIT will ignore it.

Hope it helps, official docs didn't help

brickpop
  • 2,754
  • 1
  • 13
  • 12
  • 7
    yup on react-native version 0.41.2 scheme is already configured this way.. but no luck it still won't get rid of this issue. any suggestions guys? thanks – joemalski Feb 26 '17 at 07:01
4

As of React Native 0.40 (see release notes), native code on iOS must refer to headers out of the react namespace. Previously the following would work:

#import "RCTBundleURLProvider.h"

But now all headers have been moved:

#import <React/RCTBundleURLProvider.h>

If you are updating an existing project, you need to either

  • run react-native upgrade and merge these changes manually,
  • use the new react-native-git-upgrade tool, or
  • manually change all header imports to the new format.
jevakallio
  • 35,324
  • 3
  • 105
  • 112