0

I have a web-page, that will redirect to app if the iPhone does have application installed, but if the iPhone doesnot have the app installed I want it to render the view in browser.Something i have implemented is from this answer

setTimeout(function () { window.location = "https://itunes.apple.com/appdir"; }, 25);
window.location = "appname://";

This method what does is wait for 25 ms to open native app after it renders in browser...If app doesnot open then renders view in browser..

The problem is it used to work fine in iOS 8..But while testing on iOS 9 ,I get this pop up as

"Open this page in APP".

So user is not able to tap on popUp and app doesnot get notified.After some seconds the popup disappears and view renders in browser..

How do i handle this behaviour?

Or is there any other way i should think of ?

Community
  • 1
  • 1

1 Answers1

1

In iOS 9, Apple changed the 'Open App' modal from a Javascript blocking modal to a non-blocking modal. When you try to open up the app, the modal will no longer block Javascript from executing, meaning that the fallback redirect to the App Store will execute immediately before the user can click 'Open App'

Here is a good read about the change Apple made in it's URI scheme. There is a workaround in that reference as well. It should help you.

Mtoklitz113
  • 3,828
  • 3
  • 21
  • 40