The latest version of iOS as I write this (iOS 6) no longer has a dedicated app for YouTube. We have embedded video links in our app that no longer work. This is because the URL for videos that are embedded have changed.
We would like to preserve the behaviour we have now for iOS 5 and use the new URL format for iOS 6 (and presumably greater).
Now, we can sniff the OS version and carry on that way, but Apple recommends we don’t do that; instead, we should sniff for various features.
Since the YouTube app is based on URL Scheme, we can use canOpenURL: on UIApplication.
Is there a known URL scheme for launching the YouTube app that does not work on iOS 6, but does on iOS 5?
This would be the most elegant solution. If this doesn’t exist, we’ll sniff OS version.
Apple did describe the URL scheme of their (pre iOS6) app in their developer documents. Since this is not a real scheme (it is HTTP based), it will not work with
canOpenURL:and you will need to check for the OS version.