0

I want to do an AJAX call using jQuery to check if the custom schema of my app is available, (in other words, if it can be open). The point of this is that I don't want to use a time-out like the other posts suggest, I don't want to display any alert if the browser doesn't find my url schema. So basically when I press on the button/link, I want to make this AJAX call, and on failure, I want to redirect the user to iTunes. I will try this myself, but I wanted to see if any of you thought about tried this already.

Thank you.

Cosmin
  • 2,840
  • 5
  • 32
  • 50
  • Isn't the alert that is fired by Safari automatic and not able to be suppressed if the URL schema is not registered with the device? I could be wrong. – adamdehaven Feb 13 '13 at 14:16
  • Yes it is, and I want to handle the missing URL schema through jQuery, without actually displaying an alert. – Cosmin Feb 13 '13 at 14:17
  • If it's baked into the Operating System & Safari, I'm not sure if it can be suppressed? Or have you seen a working example? – adamdehaven Feb 13 '13 at 14:18
  • I haven't, but I am looking into it. I want to make an AJAX call, but I can't seem to get it done. – Cosmin Feb 13 '13 at 14:19
  • The only way that seems possible is with a timeout. See here: http://stackoverflow.com/questions/13044805/how-to-check-if-an-app-is-installed-from-a-web-page-on-an-iphone – adamdehaven Feb 13 '13 at 14:22
  • I know, but I really want to find a solution that doesn't use a timeout. – Cosmin Feb 13 '13 at 14:23
  • From what I've read (I did some pretty extensive research 3 months ago before the final release of iOS 6.1) the only way that currently works consistently is with the timeout. Otherwise, it looks sloppy. The user won't even notice the timeout if you code it correctly. – adamdehaven Feb 13 '13 at 14:34
  • It is a good workaround, but I still can't get rid of the alert, and this is my ultimate goal. – Cosmin Feb 13 '13 at 14:38
  • Again, you cannot get rid of the Alert. It's baked into iOS. – adamdehaven Feb 13 '13 at 14:55

0 Answers0