Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

youtube Received error rendering template: Error Domain=NSCocoaErrorDomain Code=258

I try

[self.playerView loadWithVideoId:@"M7lc1UVf-VE"];

but self.playerView not response and error

youtube[14628:2831405] Received error rendering template: Error Domain=NSCocoaErrorDomain Code=258 "The file name is invalid."

what wrong?

like image 567
Patcharat Vorachacreyanan Avatar asked Nov 10 '15 10:11

Patcharat Vorachacreyanan


3 Answers

Make sure YTPlayerView-iframe-player.html is copied into your Xcode project and it appears in Settings -> Build Settings -> Copy Bundle Resources.

like image 61
whtlnv Avatar answered Sep 22 '22 08:09

whtlnv


I had the same issue. I used CocoaPods and for some reason the Assets folder was not installed.

A work around would be to manually add the Assets.bundle folder - the guide is pretty straight forward about that. I am sure you have already checked it :) https://developers.google.com/youtube/v3/guides/ios_youtube_helper

Then I ran the pod install command once again and it worked just fine.

like image 17
Mihail Velikov Avatar answered Oct 15 '22 02:10

Mihail Velikov


I ran into the same issue as well. I found a solution that works for me on their Github page: https://github.com/youtube/youtube-ios-player-helper/issues/160

Specifically, I just changed the pod with the following:

pod 'youtube-ios-player-helper', :git=>'https://github.com/youtube/youtube-ios-player-helper', :commit=>'head'

hope that helps

like image 6
Jerome Avatar answered Oct 15 '22 04:10

Jerome