andy.xyz
andy.xyz

Reputation: 3275

How can I open app url with fallback from Chrome for iOS

My website can open my app if it is installed using a URL and then fallback to an appstore link if not. Unfortunately in Chrome for iOS this does not work as I get taken to a page that says 'Chrome cannot open this URL' (error -1002 (): Unsupported URL.)

Does anyone know how to get around this, I have tried ajax load request and timers to no avail.

Upvotes: 2

Views: 1434

Answers (2)

moodooboo
moodooboo

Reputation: 11

I made Tweetable, which handles the app > website fallback for twitter, using timeouts.

https://github.com/omarish/tweetable

It tests if the app is present, and if so, loads the twitter:// deeplink. Else, it loads the website link.

Upvotes: 1

andy.xyz
andy.xyz

Reputation: 3275

In case anyone is interested in this I did find a solution. Chrome's issue on iOS is that it opens the error in a full page rather than within, for example, an iFrame.

Because of this I have managed to open a new tab, attempt the URL load, then close the tab. This works well, though there is a security warning the first time about popups...

Upvotes: 0

Related Questions