YouTube网址计划tvOS

Bla*_*ckM 7 youtube objective-c url-scheme tvos

我正试图通过我的应用程序使用URL方案或直接在iOS设备上打开YouTube应用程序的YouTube.com域打开YouTube应用程序.

这是我试过的代码:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"youtube://results?search_query=trailer+%@",movieTitle]]];
Run Code Online (Sandbox Code Playgroud)

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://www.youtube.com/results?search_query=trailer+%@",movieTitle]]];
Run Code Online (Sandbox Code Playgroud)

但似乎没有任何效果.有关如何检索YouTube tvOS应用程序的URL方案的任何想法?

Luk*_*uke -1

不一定将其视为 \xe2\x80\x9c正确的答案”,但我认为所有 YouTube 链接(至少在 iOS 上)都是由 处理的http,而不是类似youtube://.

\n\n

来源(看起来来自 2015 年 6 月):

\n\n

https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/YouTubeLinks/YouTubeLinks.html

\n

  • `youtube://` 确实在 iOS 上打开了 YouTube 应用程序。`[[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"youtube://"]];` (2认同)