嵌入 YouTube 视频YTPlayerView
不起作用。它只会在日志中给我这个错误:
2015-12-12 20:19:45.229 Wax-room[8545:3426005] 收到错误渲染模板:Error Domain=NSCocoaErrorDomain Code=258 “文件名无效。”
所以我用谷歌搜索了它,它显然与“YTPlayerView-iframe-player.html”丢失有关。我已经尝试了所有建议的位置,但要么是错误的,要么是我做错了。文档在将它与 Swift (2.x)、Cocoapods 和 iOS 9 一起使用时非常糟糕。
https://developers.google.com/youtube/v3/guides/ios_youtube_helper
pod 中也没有 Assets 文件夹。
只是偶然发现了这个:
问题是 YTPlayerView-iframe-player.html 文件不再被复制。我恢复到 0.1.4,现在我看到了 html 页面,它又可以工作了 https://github.com/youtube/youtube-ios-player-helper/issues/160
它是最新版本 0.1.5 中的一个错误。更改为 0.1.4,现在可以使用。检查这个: https ://github.com/youtube/youtube-ios-player-helper/issues/157