iOS打开带有查询的YouTube应用程序(网址方案) [英] iOS open YouTube App with query (url schemes)
本文介绍了iOS打开带有查询的YouTube应用程序(网址方案)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有使用指定搜索查询打开YouTube iOS应用的网址方案?
Is there an URL Scheme to open the YouTube iOS app with a specified search query?
我试过:
NSString *stringURL = @"http://www.youtube.com/results?search_query=foo";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
但这将打开Safari而不是YouTube应用程序。
But this will open Safari instead of the YouTube Application.
推荐答案
您无法使用此 http://www.youtube.com/results?search_query=foo
打开youtube app。如果您使用上面的网址,它将打开Safari而非youtube应用。
You can't use this http://www.youtube.com/results?search_query=foo
for opening youtube app. If you use the above url it'll open the safari instead of youtube app.
只有三个URLSchemes可用于打开youtube应用:
There are only three URLSchemes available for opening youtube app:
-
http://www.youtube.com/watch?v=VIDEO_IDENTIFIER
-
http://www.youtube.com/v/VIDEO_IDENTIFIER
-
youtube:/ /
http://www.youtube.com/watch?v=VIDEO_IDENTIFIER
http://www.youtube.com/v/VIDEO_IDENTIFIER
youtube://
参考: iPhoneURLScheme
这篇关于iOS打开带有查询的YouTube应用程序(网址方案)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文