How can I launsh my app when there is a YouTube URL opened in Safari?
I searched on the Internet very long, but I didn’t see a possibility to do this, because it is an http:// link. But the Google YouTube app does this, can anybody tell me how this works?
Thanks
The only way to do this, is to create your own URL Scheme, as denoted here – Implementing URL Schemes
You can then detect to modify any YouTube URLs so they fit in with your app’s URL Scheme with JavaScript
[webView stringByEvaluatingJavascriptFromString:yourJavaScript]Here’s the kicker. You can only modify pages from within your own web-browsing instance – i.e. creating a UIWebView inside your app, but then, your already in your app, which will render this entire exercise pointless.
You can however, use this method to communicate from within a suite of apps that you’ve built, so you could maintain your URL scheme across a web-browsing one, which will launch apps in your video playing one.
You can’t do this with Mobile Safari though.
Sorry I couldn’t be more help.