react-native-youtube: "'WKYTPlayerView.h' file not found" during installation (after manual link)

I’ve tried and retried this many times, same error. Currently the steps I’ve taken:

  1. `npm install react-native-youtube -S
  2. Project in Xcode -> Libraries -> Add Files -> node_modules/react-native-youtube/RCTYouTube.xcodeproj
  3. Then the main project -> Build Phases -> Link Binary With Libraries +libRCTYouTube
  4. npm run ios

Then I receive: /Users/danfein/Desktop/reviews/native/node_modules/react-native-youtube/RCTYouTube.h:1:9: fatal error: 'WKYTPlayerView.h' file not found #import "WKYTPlayerView.h" ^~~~~~~~~~~~~~~~~~

Any idea what this may be caused by?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

For anyone with this issue. I forked the repo and was able to link the library without cocoapods in RN 0.59 just change in your package.json this: "react-native-youtube": "eleddie/react-native-youtube#bdf7bce", Then link and it works fine.

im using with react native 59.10 version.

‘WKYTPlayerView.h’ file not found in RCTyoutube.h

error on line no 1 #import “WKYTPlayerView.h”

Updating to RN 60 was the only fix, the maintainers of this project are absolutely not helpful lol.

  1. Add this line to Podfile pod 'YoutubePlayer-in-WKWebView', :git => 'https://github.com/hmhv/YoutubePlayer-in-WKWebView'
  2. Run pod install

Cannot link manually, getting WKYTPlayerView.h’ file not found can this issue be open again?