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.
When you click on any YouTube link (including youtube.com, m.youtube.com, and youtu.be), your iOS device will automatically open the link in the YouTube App. Universal Links are automatically turned on for all devices that use iOS 9 or above as the operating system.
Any video will be fine. From there, press and hold on the YouTube.com link and choose 'Open in YouTube'. After that, go back to Safari and test a different link. The link should automatically route to the YouTube app from this point on.
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
this is working fine in iOS 9
youtube://www.youtube.com/channel/<channel-id>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With