Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native - BVLinearGradient - 'React/RCTViewManager.h' file not found

I am running my React Native app in the iOS Simulator, and I am trying to use BVLinearGradient. I followed all of the instructions in the GitHub ReadMe, but I am receiving an error related to BVLinearGradient.

In the developer console, I am seeing:

Warning: Native component for "BVLinearGradient" does not exist

When I run directly from XCode, I see:

'React/RCTViewManager.h' file not found` (in BVLinearGradientManager.h)
'React/RCTView.h' file not found` (in BVLinearGradient.h)

What is happening here? Thank you.

like image 811
user1072337 Avatar asked Apr 09 '17 20:04

user1072337


1 Answers

I had the exact same issue a few days ago. The problem is that React is not linked yet when building the app. Try this:

Go to Product => Scheme => Manage Schemes... => Click on your app Scheme (usually the first one on the list) and click Edit => Go to the Build tab => Uncheck Parallelize Build

Then Click on the + sign to add a target => Search for React, select the first target called React and click on Add

Add React to targets list

Then select React in the targets list and drag it up to be first in that list.

Then go to Product => Clean and build your project again.

That should help.

like image 156
Santiago Bendavid Avatar answered Oct 20 '22 00:10

Santiago Bendavid