react-native-youtube
react-native-youtube copied to clipboard
iOS Install Guide | React Native 60.5
This is the only procedure that worked for me when installing this library. It solves:
- Invariant Violation: requireNativeComponent:"ReactYoutube" was not found in UIManager
- Blank white thumbnail, video wont play
- Archiving build error
- Random build errors on iOS
If the readme isn't working for you, give this a try...
Procedure
-
npm install react-native-youtube --save
-
In Xcode, add RCTYouTube.xcodeproj to Libraries
-
Build Phases > Link Binary With Libraries > add libRCTYouTube.a
-
Click on the RCTYouTube Library, mark the Pods header search path as recursive
-
Open your Podfile, add
pod "YoutubePlayer-in-WKWebView", "~> 0.3.3"
or whatever the latest version is of https://github.com/hmhv/YoutubePlayer-in-WKWebView then run:
cd ios
pod update
- After running
pod update
, make sure in Xcode, Pods > Pods folder > YoutubePlayer-in-WKWebView is there and in Products libYoutubePlayer-in-WKWebView.a is there also.
- 7.1 If it doesn’t show in Xcode after pod update close Xcode, delete the Pods folder and podfile.lock and do pod update again.
Now click Run in Xcode. It’ll use the manually linked RCTYouTube library coupled with the WKWebView dependency as a pod.
Time to solve: 2 days