Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
AdrianZghibarta opened this issue Jan 26, 2017 · 36 comments
Labels
Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@AdrianZghibarta
Copy link

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

@Msspl-PrashenjeetRoy
Copy link

Msspl-PrashenjeetRoy commented Feb 1, 2017

@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 <React/RCTBundleURLProvider.h> and "RCTBundleURLProvider" this on import.

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

@brian-nchostorm
Copy link

me too +1

@GeoInMeluo
Copy link

me too +2

@GeoInMeluo
Copy link

someone can help me ?

@Msspl-PrashenjeetRoy
Copy link

Msspl-PrashenjeetRoy commented Feb 5, 2017 via email

@GeoInMeluo
Copy link

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 : )

@Msspl-PrashenjeetRoy
Copy link

Msspl-PrashenjeetRoy commented Feb 6, 2017 via email

@GeoInMeluo
Copy link

GeoInMeluo commented Feb 6, 2017

@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

@Msspl-PrashenjeetRoy
Copy link

Msspl-PrashenjeetRoy commented Feb 6, 2017 via email

@GeoInMeluo
Copy link

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

@shergin shergin added the Platform: iOS iOS applications. label Mar 16, 2017
@aiDove
Copy link

aiDove commented Apr 7, 2017

RN-0.43.2 has solved this issue.

@JeffersonFilho
Copy link

JeffersonFilho commented Apr 29, 2017

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>

@SnehaGindi
Copy link

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.

@godLoveY
Copy link

me too +2,someone can help me ?

@yale
Copy link

yale commented May 24, 2017

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.

@yale
Copy link

yale commented May 24, 2017

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

@drpiou
Copy link

drpiou commented Jun 5, 2017

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...

@liorzil
Copy link

liorzil commented Jun 9, 2017

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

@mryechkin
Copy link

@SnehaGindi that fixed the issue for me, thanks!

@masarufuruya
Copy link

masarufuruya commented Jul 9, 2017

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

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

@myhere
Copy link

myhere commented Jul 13, 2017

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

@shivam-ucreate
Copy link

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.

@SnehaGindi
Copy link

SnehaGindi commented Jul 17, 2017 via email

@mahendra13
Copy link

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.

@hushicai
Copy link

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

@voidException
Copy link

@hushicai metoo

@HyperSimon
Copy link

@hushicai +1

@dudwchina
Copy link

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

@stale
Copy link

stale bot commented Dec 1, 2017

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.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 1, 2017
@stale stale bot closed this as completed Dec 8, 2017
@25308985
Copy link

25308985 commented Jan 4, 2018

Thanks @SnehaGindi : it works for me :).

@yizibi
Copy link

yizibi commented Jan 6, 2018

me too,
ev:
xcode 9,RN-0.51

@testshallpass
Copy link

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

@septuagint
Copy link

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

@charlesbdudley
Copy link
Contributor

@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 =)

@razor1895
Copy link

@testshallpass thanks!!! It really works

@yale
Copy link

yale commented Mar 6, 2018

@testshallpass thank you!!

@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests