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

[v3] [iOS] 'React/RCTConvert.h' file not found #5258

Closed
airman00 opened this issue Jul 3, 2019 · 10 comments
Closed

[v3] [iOS] 'React/RCTConvert.h' file not found #5258

airman00 opened this issue Jul 3, 2019 · 10 comments

Comments

@airman00
Copy link

airman00 commented Jul 3, 2019

Issue Description

I've installed React Native Navigation V3 on a fresh install of React Native 0.60, manually as per the instructions here:
https://wix.github.io/react-native-navigation/#/docs/Installing

yarn add react-native-navigation@3.0.0-alpha.2

I am getting this error when I try to build:
/Users/{name}/App/node_modules/react-native-navigation/lib/ios/RNNOptions.h:2:9: 'React/RCTConvert.h' file not found

If I go to Product > Edit Scheme > Build (3 targets), I see React(missing) which I'm assuming is what is causing the problem. When I try to add React with the plus sign, there is no option for React in React Native 0.60. Only the following, and I've tried React-Core with no success.
image

Any idea what might be going wrong?

Steps to Reproduce / Code Snippets / Screenshots

  1. Clean React Native 0.60 project
  2. Manually install React Native Navigation V3
  3. Get error `'React/RCTConvert.h' file not found``

Environment

  • React Native Navigation version: 0.60
  • React Native version: 3.0.0-alpha.2
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): iPhoneX Device Debug
@jiho0113110
Copy link

https://github.com/react-native-community/cli/blob/master/docs/autolinking.md

@thinhtran3588
Copy link

I got the same issue today & took me half of a day trying different approach.
Finally found a very simple way.
Don't manually add React-native-navigation to Libraries & Build Phases. Instead just run
react-native link react-native-navigation
It adds pod 'ReactNativeNavigation', :path => '../node_modules/react-native-navigation to Podfile and works like a charm!

@airman00
Copy link
Author

airman00 commented Jul 9, 2019

Thanks @thinhtran3588! Works great!

Here are the steps for anyone else running into issues on React Native 0.60

  1. In your app folder: yarn add react-native-navigation@3.0.0-alpha.2
  2. In your app folder: react-native link react-native-navigation
  3. In your ios folder: pod install
  4. Clean & Build your Xcode Project. Done

@airman00 airman00 closed this as completed Jul 9, 2019
@softmastx
Copy link

Here steps what I've done to get it works for RN 060.
As mention above,

Do not manually add React-native-navigation to Libraries & Build Phases!

npm install --save react-native-navigation
react-native link react-native-navigation
pod install

After that you will be able to #import <ReactNativeNavigation/ReactNativeNavigation.h> in AppDelegate.m

@iheart2code
Copy link

Had the exact same issue, and the magic step missing for me was the pod install step. Everything worked after that. Thanks, @airman00 !

@DavidKongDesheng
Copy link

In Xcode, in Project Navigator (left pane), right-click on the Libraries > Add files to [project name]. Add node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj-------> need select copy files option

@davidmarinangeli
Copy link

davidmarinangeli commented Oct 24, 2019

Here steps what I've done to get it works for RN 060.
As mention above,

Do not manually add React-native-navigation to Libraries & Build Phases!

npm install --save react-native-navigation
react-native link react-native-navigation
pod install

After that you will be able to #import <ReactNativeNavigation/ReactNativeNavigation.h> in AppDelegate.m

AppDelegate.m doesn't give me problems now but the React/RCTConvert.h file not found problem is still there.

If I rename <React/RCTConvert.h> with "RCTConvert.h" it doesn't give an error but I don't think it's a proper fix also because I should fix every RNN file.

Have someone figured it out? Why is this issue closed?

RNN 3.2.0
RN 0.61.2

@hb12devtn
Copy link

To solve the issue, you have to do the following:

  1. In Xcode, go to the project scheme (Product -> Scheme -> Manage Scheme -> double click your project).
  2. Click on the 'Build' option at the left pane.
  3. Uncheck 'Parallelize Build' under Build Options.
  4. Then in Targets section, click '+' button then search for 'React'. Select it and click 'Add'.
  5. 'React' should now appear under Targets section. Click and drag it to the top so that it will be the first item in the list (before your project).
  6. Clean the project and build.

@bmwertman
Copy link

I've tried @airman00, @softmastx and @hb12devtn solutions and am still facing this as I try to upgrade to React Native v0.61.4.

@bmwertman
Copy link

I was on an old version. After upgrading @softmastx solution fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants