react-native-vector-icons: RNVectorIconsManager not available, did you add library to your project and link with libRnVectorIcons.a
using     "react-native": "0.42.0"  &      "react-native-vector-icons": "^4.0.0", & Xcode 8.2.1
still getting this error after install and running react-native link . Is the process not automatic?
About this issue
- Original URL
 - State: closed
 - Created 7 years ago
 - Comments: 24 (6 by maintainers)
 
I am getting the same issue, but only when running component tests with Jest - Is there an example mock for testing purposes?
@chrismllr or to anyone reaching here because you are testing with jest and testing the getImageSource, you can mock that function like this (point to any icon):
I got rid of the cocoapods. It just isn’t easy to upgrade this repo consistently with it, but it may be more about
react-native linkintegration than anything.I just came across this issue because I needed to mock getImageSource. A slightly-different syntax from what @sfratini posted above worked for me:
The trick was understanding that we’re not mocking
react-native-vector-iconshere, we’re mocking the underlyingNativeModule.I’m going to close this, please open a PR with proposed documentation changes if you think they are still unclear.
@systemlevel: the link phase you’re showing is not for your project, click on s2h_mobile and ensure you’re linking there.
It is frustrating, @oblador, but I do believe it is more RN than this repo. I think you’ve done a great job providing a seriously quality library. If you read above, I noted using cocoapods with this lib makes for very flaky uprades and specifically said “it may be more about react-native link integration than anything.”
So I am not dismissing this lib by any stretch. It is worth noting other libraries I use do not have the same problems as this one. There are some that do, though; hence the above quote.