Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"RCTBundleURLProvider.h" file not found - AppDelegate.m

xcode Product->Scheme->Manage Schemes click '+' at the Target to select "React" and set the React is shared.


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.


For all those are using React Native 0.40.0 or higher, Header Imports have a major change from RN 0.40.0 and result in lots of .h file not found errors. react-native-git-upgrade fixed the issue for me while in debug but build fails in release/archive.

I am using RN 0.42.3 with cocoapods and Xcode 8.2.1

To completely fix this go to Xcode>Product>Scheme>Edit Scheme>

  1. Untick Parallelize Build enter image description here
  2. Click on + button in Targets and add React enter image description here
  3. Drag the added React to top of the List in Targets. enter image description here

Now clean the project and build


None of the other suggestions were fixing my error but this one did it.

1 - Create Podfile

Create a file named ios/Podfile inside your react-native app with the following contents:

# You Podfile should look similar to this file. React Native currently does not support use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'

target '<YOUR_APP_NAME>' do
  # Fixes required for pod specs to work with rn 0.42
  react_native_path = "../node_modules/react-native"
  pod "Yoga", :path => "#{react_native_path}/ReactCommon/yoga"
  pod "React", :path => react_native_path, :subspecs => [
    'Core',
    'RCTActionSheet',
    'RCTAnimation',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket'
  ]

  pod 'GoogleMaps'  # <~~ remove this line if you do not want to support GoogleMaps on iOS

# when not using frameworks  we can do this instead of including the source files in our project (1/4):
#  pod 'react-native-maps', path: '../../'
#  pod 'react-native-google-maps', path: '../../'  # <~~ if you need GoogleMaps support on iOS
end

2 - Install Podfile

Run the command pod install from inside the ios folder.

3 - Reset XCode

Restart XCode and the error should be gone.


The solution that works for me is to share React scheme.

If you don't have React scheme, create new one by Selecting scheme menu -> Manage Scheme -> + -> choose React, then mark React scheme as Shared

enter image description here

enter image description here enter image description here

Also, if you use Xcode 10, go to File -> Project Settings and select Legacy build system

enter image description here