React-native: [iOS] [RN-0.40] #import <React/RCTBundleURLProvider.h> doesn't find the file for build configuration other than Debug

Created on 26 Jan 2017  Â·  36Comments  Â·  Source: facebook/react-native

Let's say that I create a new Build Configuration "Debug Copy" that is actually a copy from "Debug" configuration.
If I select "Debug" configuration all is working fine(project compiles), but if I select "Debug Copy" project doesn't compile with error 'React/RCTBundleURLProvider.h' file not found.
I need multiple build configuration and in the version 0.39 all was working fine.

screen shot 2017-01-26 at 12 09 59

iOS Stale

Most helpful comment

Open 'Build Settings', 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

Make it recursive.

All 36 comments

@AdrianZghibarta Even in my case 0.39.0 also not working.
screen shot 2017-02-01 at 12 23 05 pm

My package.json is :
"dependencies": {
"react": "15.4.2",
"react-native": "0.39.0",
"react-native-auth0": "^1.0.0-beta.1",
"react-native-image-picker": "^0.24.0",
"react-native-lock": "^0.4.0",
"react-native-tab-view": "0.0.49",
"react-native-vector-icons": "^4.0.0",
"react-redux": "^5.0.2",
"react-timer-mixin": "^0.13.3",
"redux": "^3.6.0",
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"babel-jest": "18.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "18.1.0",
"react-test-renderer": "15.4.2"
},

Can anyone suggest me what to do. I was using react native 0.40.0 but it's giving lots of library import file not found error. Now using rn 0.39.0 most problems were solved but RCTBundleURLProvider file not found issue is showing now. I also tried with and "RCTBundleURLProvider" this on import.

What to do any suggestion? I am stuck with these issue from yesterday and already wasted one working day.

me too +1

me too +2

someone can help me ?

https://github.com/evollu/react-native-fcm/issues/201
On 5 Feb 2017 12:05 p.m., "GeoInMeluo" notifications@github.com wrote:

someone can help me ?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/12077#issuecomment-277500768,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APsvIyFYDhZ3L03HxTjKJ_Shm-HAP4PTks5rZW29gaJpZM4LueUT
.

The second step and the third step can again a little bit in detail ? Now I only know to update pod,but it's field...The Podfile use this ?

pod 'React', :path => '../node_modules/react-native', :subspecs => [
'RCTText',
'RCTImage',
'RCTNetwork',
'RCTWebSocket',
]

pod installl result is "The dependency React/RCTText (from../node_modules/react-native) is not used in any concrete target."

Hope you answer agin : )

Hey have you followed all the readme of react native fcm... And installed
pod firebase/messaging. ... Show me code of podfile...
On 6 Feb 2017 8:58 a.m., "GeoInMeluo" notifications@github.com wrote:

The second step and the third step can again a little bit in detail ? Now
I only know to update pod,but it's field...The Podfile use this ?

pod 'React', :path => '../node_modules/react-native', :subspecs => [
'RCTText',
'RCTImage',
'RCTNetwork',
'RCTWebSocket',
]

pod installl result is "The dependency React/RCTText (from
../node_modules/react-native) is not used in any concrete target."

Hope you answer agin : )

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/12077#issuecomment-277578813,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APsvIyJmh62I3GV4hdldyXXLLAlnryLfks5rZpM-gaJpZM4LueUT
.

@Msspl-PrashenjeetRoy yeah,i'm followed them and my pod file just write
"
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'RCTText',
'RCTImage',
'RCTNetwork',
'RCTWebSocket',
]
"
it's all my podfile
i'm a novice : )
hope u step by step, thanks very much

Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'YourProjectName' do
# Uncomment the next line if you're using Swift or would like to use
dynamic frameworks
use_frameworks!

# Pods for YourProjectName
pod "Firebase/Messaging"

target 'YourProjectName' do
inherit! :search_paths
# Pods for testing
end

end

I don't know much about the pod config but I added this pod
"Firebase/Messaging" then in terminal use "pod install".
So give a try and provice some screenshot on github or just in react-native
group on messanger.

On Mon, Feb 6, 2017 at 10:21 AM, GeoInMeluo notifications@github.com
wrote:

@Msspl-PrashenjeetRoy https://github.com/Msspl-PrashenjeetRoy yeah,i'm
followed them and my pod file just write
"
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'RCTText',
'RCTImage',
'RCTNetwork',
'RCTWebSocket',
]
"
it's all my podfile : )

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/12077#issuecomment-277586202,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APsvI3hvj3wZsfUx-lc4H6xCOtMaNd0Aks5rZqbZgaJpZM4LueUT
.

--
Prashen Jeet Roy
Web Designer

Thanks, i'm solved this problem.reason is no config localhost, then download some file .the project is run

RN-0.43.2 has solved this issue.

I had the same issue and I fixed it by placing RNFIRMessaging.h above the React/RCTBundleURLProvider.h on the AppDelegate.m

So it will look like:

#import "AppDelegate.h"
#import "RNFIRMessaging.h"

#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

Open 'Build Settings', 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

Make it recursive.

me too +2,someone can help me ?

I'm having this issue as well on a fresh new react native project. I have followed all of the suggestions above.

This is only happening on my custom "Staging" build configuration (which is a copy of Release). I am using react-native-schemes-manager to ensure all projects are properly configured with my Staging scheme.

I am able to build Staging and run it on a simulator, but this error crops up when trying to build Staging for a generic device: 'React/RCTBundleURLProvider.h' file not found.

Was able to reproduce on a fresh project using the following steps:

  1. Create new Configuration called Staging, choosing "Duplicate 'Release' Configuration"
  2. Create a new scheme called Staging
  3. For each step in the scheme, choose the Staging build configuration
  4. Attempt to archive the app

I have the same issue with fresh RN-0.44. To reproduce what i've done:

  • just start a new project and (try to) compile with Xcode...

In the command line, cd to the project directory and type in npm install.

@SnehaGindi that fixed the issue for me, thanks!

@SnehaGindi Thanks!! fixed the issue for me!
I add header path and changed import sentence.

#import "RCTBundleURLProvider.h"
#import "RCTRootView.h"

i tried all the methods above, still can't fix it.
and i create a new project with react-native init still the same error. :(

env:

  • xcode:

    • Version 8.3.3 (8E3004b)

  • react-native:

    • 0.42.0

  • react

    • ~15.4.1

image

Have you installed the npm in your project.
Just go to the root directory and run this command it will install the all modulesnpm install.
Then go the Xcode- Header-Search-Path- $(SRCROOT)/../node_modules/react-native/React and make it recursive.

Hey Lin,

Try these techniques:

  1. Open 'Build Settings', 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

Make it recursive.

  1. Create new Configuration called Staging, choosing "Duplicate 'Release'
    Configuration"

    1. Create a new scheme called Staging

    2. For each step in the scheme, choose the Staging build configuration

    3. Attempt to archive the app

  2. In the command line, cd to the project directory and type in npm install.

If none works, try this.

  1. You can kill the project and start a new one.

    Make sure the empty project runs and compiles on Xcode.

Let me know how it goes.

Thank you,

Sneha Gindi.

On Thu, Jul 13, 2017 at 7:44 PM, Lin Zhang notifications@github.com wrote:

i tried all the methods above, still can't fix it.
and i create a new project with react-native init still the same error. :(

env:

  • xcode:

    • Version 8.3.3 (8E3004b)

  • react-native:

    • 0.42.0

  • react

    • ~15.4.1

[image: image]
https://user-images.githubusercontent.com/515630/28170301-8f943c8c-6817-11e7-80af-740dcc82c699.png

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/12077#issuecomment-315090136,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATkeRP8Lu2fWZhYHktd44KJ-TX9yc5LFks5sNiZBgaJpZM4LueUT
.

For react-native-navigation i resolved it by applying the following..
Xcode Product ---> Scheme ---> Manage Schemes click '+' at the Target to select "React" and set the React is shared.

RN 0.47.1, I also meet the same problem, but I can run it successfully, and after that, everything is ok....

@hushicai metoo

@hushicai +1

specify the version num eg. react-native init DemoApp --version 0.44.3
it works for me
xcode9
latest version of react

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

Thanks @SnehaGindi : it works for me :).

me too,
ev:
xcode 9,RN-0.51

I encountered this same issue while archiving a custom build configuration/scheme. I was able to fix by changing the Pre-configuration Build Products Path to:$(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME) in Build Settings. Perhaps this might help you @yale

@testshallpass Sir, may you live to be a thousand. Thank you x 1000. I'm out of compiling purgatory.

@testshallpass this worked for me. For anyone else coming here, the property to search for is "Per-configuration Build Products Path". That typo got me for a few minutes =)

@testshallpass thanks!!! It really works

@testshallpass thank you!!

Was this page helpful?
0 / 5 - 0 ratings