Is there an URL Scheme to open the YouTube iOS app with a specified search query?
I tried:
NSString *stringURL = @"http://www.youtube.com/results?search_query=foo";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
But this will open Safari instead of the YouTube Application.
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.
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://
Reference: iPhoneURLScheme