Kureev / react-native-blur

React Native Blur component
MIT License
3.77k stars 557 forks source link

Error: Invariant Violation: Native component for "BlurView" does not exist #258

Open VicFrolov opened 6 years ago

VicFrolov commented 6 years ago

react-native 0.52.0

just installed blurview:

import { BlurView } from 'react-native-blur';

render() {
  // some code
 <BlurView blurType="light" style={styles.blur} />
 // more code
}

getting this error: screen shot 2018-01-19 at 5 55 11 pm

EDIT: This seems to also be occuring for react-native-linear-gradient

ashleydw commented 6 years ago

Solution in #249; add the libRNBlur.a manually to Build Phases

andrescalco commented 6 years ago

Can you guys provide me more info on how to add the libRNBlur.a manually to Build Phases?

pcoltau commented 6 years ago

@ashleydw Where do I find libRNBlur.a? Running find . -name "libRNBlur.a" gives me nothing..

ashleydw commented 6 years ago

see https://facebook.github.io/react-native/docs/linking-libraries-ios.html

andfk commented 6 years ago

For people using Codepods instead of the manual linking, make sure to run pod install on ios folder after the react-native link react-native-blur

VladyslavKochetkov commented 5 years ago

For some reason in this project react-native link doesn't work. The following solves this issue. Open XCode, go to your workspace. Right click on your project and press on Add files to "<project name". Go to node_modules -> react-native-blur -> ios and select RNBlur.xcodeproj and press Add. Press on your project go to Build Phases -> Link Binary with Libraries press on the + and add libRNBlur.a. Now it should work

bensont1 commented 5 years ago

I'm using cocoapods and this still doesn't work. I get an error on <React/RCTComponent.h>

React/RCTComponent.h file not found,

I've tried linking manually as well, no luck