React-native-vector-icons: Include path on iOS

Created on 7 Jan 2017  Â·  15Comments  Â·  Source: oblador/react-native-vector-icons

I had to remove the React/ prefix for all RCT*.h includes on iOS. The iOS Xcode project includes React/ and enables recursive search. Some of the headers are located in React/Base so React/RCTxxx.h won't work.

Most helpful comment

For those who want a detailed instructions:

  • Open ios/[project-name].xcodeproj with XCode
  • In the left panel (Project Navigator), navigate to Libraries/RNVectorIcons.xcodeproj/RNVectorIconsManager
  • In RNVectorIconsManager.h and RNVectorIconsManager.m, remove the React/ prefix from all includes, for example: #import <React/RCTConvert.h> => #import <RCTConvert.h>

All 15 comments

im having the same issue where all React/RCT*.h imports are resulting in "not found" error

React Native 0.40 has a breaking change in how headers are included, therefore use 3.0.0 for older versions of React Native.

Which patch fixes this?

It's not a bug/fixable. It's not possible to support both versions, you need to downgrade to RNVI 3.0.0 or upgrade RN to 0.40.

I am having the same problem with [email protected]
the whole error says like -
error: 'React/RCTBridgeModule.h' file not found

import

    ^

:0: error: failed to import bridging header '/path-to-my-proj/ios/play-Bridging-Header.h'

@nafiskarim For the third time in this thread :-)

React Native 0.40 has a breaking change in how headers are included, therefore use 3.0.0 for older versions of React Native.

For those who want a detailed instructions:

  • Open ios/[project-name].xcodeproj with XCode
  • In the left panel (Project Navigator), navigate to Libraries/RNVectorIcons.xcodeproj/RNVectorIconsManager
  • In RNVectorIconsManager.h and RNVectorIconsManager.m, remove the React/ prefix from all includes, for example: #import <React/RCTConvert.h> => #import <RCTConvert.h>

@sonlexqt Thank you,troubled for several days of the problem, finally resolved。

im on RN 0.44.0 and i have this issue

same problem, after ejecting from expo, Xcode fail on
'RCTBridgeModule.h' file not found

try to modify the Header Search Path of RNVectorIcons, in vain...

I find that if I make any small change to my project I get this error. I am linking the ExpoKit fork of this module through CocoaPods. Adding $(SRCROOT)/ios/Pods/Headers/Public to the Header Search Paths seems to be mandatory to fix this, but that alone is not enough. It may or may not be necessary to uncheck Parallelize Build on the scheme and add React to the targets.

In addition to adding to the Header Search Paths, it seems to be necessary to delete the Pods directory, Podfile.lock, build directory and rerun pod install in order to get past this error. You also need to Clean your project in Xcode before trying to run again. Usually if I am getting this error and do that I can get my project to build successfully. However, as soon as I make any small change, this error comes back.

This is very annoying and there has to be a better solution! Can anyone suggest a better way?

Some people seem to believe this issue is resolved when it is not, more than .14 versions later the same error appears for a different reason. A true solution would be something very clear within the repo, a source of truth that actually solves the problem.

For example "modify header search path of dependency to get the node_modules" or for the base project, or is the issue that react is being required by this dependency through it's pod requirements? Answers to these questions have become a requirement for using this dependency.

@oblador Still have this issue with React 0.60.5 :-(

This issue still persists . React 0.63

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arjs1000 picture arjs1000  Â·  3Comments

rmilejcz picture rmilejcz  Â·  3Comments

fevzican picture fevzican  Â·  3Comments

peacechen picture peacechen  Â·  3Comments

lossen picture lossen  Â·  4Comments