React-native-youtube: error when loading youtube video on iOS

Created on 3 Dec 2017  路  8Comments  路  Source: davidohayon669/react-native-youtube

I've been doing all the requirements (installing, linking the lib both ways, calling the component) and still have an error on the screen that holds the component. I provided an apiKey.
The error says:
invariant violation: Native component for "RCTYoutube" does not exist.

I'm not using create-react-native starter, and build my app through react-native run-ios

Could you please help me solving this basic issue ?
Thanks

Most helpful comment

@rajatbeck, open your IOS project in Xcode and check to see if the "RCTYoutube.xcodeproj" library was actually added to the "Libraries" folder. Also check to see if "libRCTYouTube.a" was added to the "Link Binary With Libraries" list found in your Targets' Build Phases.

If not, you need to add the "RCTYoutube.xcodeproj" library to the Xcode Libraries folder. You can find "RCTYoutube.xcodeproj" in the react-native-youtube folder of your app's Node Modules folder. Once you've done that you'll be able to find the "libRCTYouTube.a" binary when you click the "+" option at the end of the "Link Binary With Libraries" list found in your Targets' Build Phases. All should be working after this is done.

The official docs for manually linking libraries explains it well with screenshots: https://facebook.github.io/react-native/docs/linking-libraries-ios.html

All 8 comments

Same problem while Working with Windows & Android.

Same problom

any update on that ?

Also getting the same issue but did not provide an APIKey.

facing the same issue on my side...any updates in this issue??

@rajatbeck, open your IOS project in Xcode and check to see if the "RCTYoutube.xcodeproj" library was actually added to the "Libraries" folder. Also check to see if "libRCTYouTube.a" was added to the "Link Binary With Libraries" list found in your Targets' Build Phases.

If not, you need to add the "RCTYoutube.xcodeproj" library to the Xcode Libraries folder. You can find "RCTYoutube.xcodeproj" in the react-native-youtube folder of your app's Node Modules folder. Once you've done that you'll be able to find the "libRCTYouTube.a" binary when you click the "+" option at the end of the "Link Binary With Libraries" list found in your Targets' Build Phases. All should be working after this is done.

The official docs for manually linking libraries explains it well with screenshots: https://facebook.github.io/react-native/docs/linking-libraries-ios.html

"open your IOS project in Xcode and check to see if the "RCTYoutube.xcodeproj" library was actually added to the "Libraries" folder. Also check to see if "libRCTYouTube.a" was added to the "Link Binary With Libraries" list found in your Targets' Build Phases."

i'm already do this step but it still error invariant violation: Native component for "RCTYoutube" does not exist.
anyone can help

thanks, @udugam

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johnnykoo84 picture johnnykoo84  路  4Comments

dungnguyen10989 picture dungnguyen10989  路  3Comments

RetroPronghorn picture RetroPronghorn  路  3Comments

nhcuong95 picture nhcuong95  路  5Comments

webdevbyjoss picture webdevbyjoss  路  4Comments