2

I followed this guide on Twitter Dev Site in my app, Captions for Instagram, to set up the query scheme. It looks like this: enter image description here

Then in my other app, I've added captions to LSApplicationQueriesSchemes and I am running the following code in that app:

let url = NSURL(string: "captions://")!
if UIApplication.sharedApplication().canOpenURL(url) {
   UIApplication.sharedApplication().openURL(url)
}

Using breakpoints, I found that UIApplication.sharedApplication().canOpenURL(url) is returning true but UIApplication.sharedApplication().openURL(url) is not doing anything.

shakked
  • 783
  • 8
  • 24
  • must be http://stackoverflow.com/questions/30731785/how-do-i-load-an-http-url-with-app-transport-security-enabled-in-ios-9 – techloverr Mar 22 '16 at 13:18
  • Does `openURL` run if you don't check for `canOpenURL` first? Are you using this only for behind-the-scenes communication between the two apps, or would the resulting `captions://` links ever be seen by the user? What if the receiving app isn't installed? – Alex Bauer Mar 22 '16 at 13:47
  • Yes it does run but still does nothing and if the `canOpenURL` fails I would present a `SKStoreProductViewController` with the app – shakked Mar 22 '16 at 13:52

0 Answers0