YouTube URL方案tvOS [英] YouTube URL Scheme tvOS
问题描述
我正在尝试使用URL方案或直接在iOS设备上打开YouTube应用程序的YouTube.com域从我的应用程序中打开YouTube应用程序.
I am trying to open YouTube's app from my application with the URL scheme or the YouTube.com domain which opens YouTube's app directly on an iOS device.
这是我尝试的代码:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"youtube://results?search_query=trailer+%@",movieTitle]]];
和
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://www.youtube.com/results?search_query=trailer+%@",movieTitle]]];
但是似乎没有任何效果.关于如何为YouTube的tvOS应用程序检索URL方案的任何想法?
But nothing seems to work. Any ideas on how to retrieve the URL scheme for YouTube's tvOS application?
推荐答案
在youtube应用程序中播放youtube视频时,我也遇到了一些问题,但是我找到了一种解决方法,我使用XCDYouTubeKit库直接在我的应用程序中播放了youtube视频.到目前为止,它非常易于使用并且运行良好.
I also encountered some issues playing youtube videos in the youtube app but I found a workaround, I used the XCDYouTubeKit library to play the youtube video's directly in my app. It's very easy to use and works fine so far.
XCDYouTubeKit: https://github.com/0xced/XCDYouTubeKit
XCDYouTubeKit : https://github.com/0xced/XCDYouTubeKit
这篇关于YouTube URL方案tvOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!