React-native-blur: Error: Invariant Violation: Native component for "BlurView" does not exist

Created on 20 Jan 2018  路  7Comments  路  Source: Kureev/react-native-blur

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

Most helpful comment

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

All 7 comments

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

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

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

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

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

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

Was this page helpful?
0 / 5 - 0 ratings