Open martinprot opened 8 years ago
Duplicate of #15.
@JALsnipe I'm having this issue too with 0.1.5 and I agree it is a duplicate but it is new in the sense that it wasn't an issue in 0.1.4 so #15 no longer applies (at least the way I look at it).
The issue is that the YTPlayerView-iframe-player.html file is not being copied over anymore. I reverted back to 0.1.4 and now I see the html page and it works again
@ikbenben There's related discussion about the missing asset in https://github.com/youtube/youtube-ios-player-helper/issues/157
+1
I have a same issue with 1.0.5. "~~ Received error rendering template: Error Domain=NSCocoaErrorDomain Code=258 "The file name is invalid." I refreshed pods cache and updated all pods, but it doesn't seem to be fixed. :(
Same issue over here, this is really bad.
Master branch has patch - for cocoapods users, a new podfile & version tag should be released
For the time being change your pod reference to point to the master branch
pod 'youtube-ios-player-helper', :git=>'https://github.com/youtube/youtube-ios-player-helper', :commit=>'head'
@tbrannam thanks a lot !!
@tbrannam this works for me
The changes for Podfile didn't help me.
Finally I made it work in these steps.
NSString *path = [[NSBundle mainBundle] pathForResource:@"YTPlayerView-iframe-player"
ofType:@"html"
inDirectory:@"Assets"];
To:
NSString *path = [[NSBundle mainBundle] pathForResource:@"YTPlayerView-iframe-player"
ofType:@"html"];
Even i had same problem,
replace the code below:
NSString *path = [[NSBundle bundleForClass:[YTPlayerView class]] pathForResource:@"YTPlayerView-iframe-player" ofType:@"html" inDirectory:@"Assets"];
To:
NSString *path = [[NSBundle bundleForClass:[YTPlayerView class]] pathForResource:@"YTPlayerView-iframe-player" ofType:@"html" inDirectory:@"Assets.bundle/Assets"];
i am working in Swift 3 and have dragged .h , .m and the html file in my project and used bridging.
following error is coming :
Received error rendering template: Error Domain=NSCocoaErrorDomain Code=261 "The file “YTPlayerView-iframe-player.html” couldn’t be opened using text encoding Unicode (UTF-8)." UserInfo={NSFilePath=/Users/sierra4/Library/Developer/CoreSimulator/Devices/FA9E5F10-4799-4CB2-87E9-1566B759A754/data/Containers/Bundle/Application/CA9A132E-4EA8-4036-8B0E-FFF9DC32BC63/DemoYoutube.app/YTPlayerView-iframe-player.html, NSStringEncoding=4}
@flamesoft I didn't get "YTPlayerView-iframe-player.html" from where I have to find it ?
@abhanegi Download the youtube-ios-player-helper-master project from https://github.com/youtube/youtube-ios-player-helper. Then you will find it in the Assets.bundle.
Please check you have added Assets framework in app. I add it and it works for me.
I declare
@property (nonatomic, weak) IBOutlet YTPlayerView *playerView;
Then, in code:
This works on 0.1.4 But on 0.1.5, an error message appears
Received error rendering template: Error Domain=NSCocoaErrorDomain Code=258 "Le nom de fichier n’est pas valide."
(The error message is localized in french, which means : the file name is not valid.