Thomas Dittmar
Thomas Dittmar

Reputation: 1924

Warning: Native component for "BVLinearGradient" does not exist

I'm trying to implement react-native-linear-gradient but I get the following error once I import the library into my react-native component:

import LinearGradient from 'react-native-linear-gradient'

enter image description here

I can successfully compile the project in XCode and the gradient shows up on the physical iPhone but it doesn't in the Simulator.

Has anyone dealt with this problem before?

Again, the problem is that react-native (iOS Simulator) can't find the library but the BVLinearGradient library are there in Xcode and the project compiles successfully.

enter image description here

Thanks

Upvotes: 18

Views: 6102

Answers (1)

Kubilay Kiymaci
Kubilay Kiymaci

Reputation: 472

I see you're using RN 0.6.x, so you don't have to link. You ought to cd into your ios directory and run this command.

"pod install"

And you should read README of linear gradient carefully for iOS integration.

Upvotes: 1

Related Questions