Sunday, January 31, 2016

iOS 9.0 Launching Youtube, Facebook URLs

Interestingly, after updating the build to use Xcode 9.0 the Youtube launch URLs were giving issues that it wont open. Looking at the logs, it was giving the below error traces.

 -canOpenURL: failed for URL: "youtube://www.youtube.com/watch?v=Ere-FvKExXY&index=3&list=PLtZjA7gksgZS74bJl5NJbns2-bP6Jk-hJ" - error: "This app is not allowed to query for scheme youtube"

I do not remember seeing somewhere this is documented when going through the iOS 9.x related changes. Below seems to be what is required to fix the issue. We need to add property in the LSApplicationQueriesSchemes like shown in image below

References:
http://useyourloaf.com/blog/querying-url-schemes-with-canopenurl.html

No comments:

Post a Comment