React-native-navigation: [v3] [iOS] 'React/RCTConvert.h' file not found

Created on 4 Jul 2019  路  10Comments  路  Source: wix/react-native-navigation

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 [email protected]

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

Most helpful comment

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 [email protected]
  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

All 10 comments

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!

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 [email protected]
  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

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 in AppDelegate.m

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

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

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

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.

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brunolemos picture brunolemos  路  50Comments

diennguyentien picture diennguyentien  路  59Comments

dozoisch picture dozoisch  路  37Comments

gtchance picture gtchance  路  57Comments

perrosnk picture perrosnk  路  36Comments