hampusohlsson / browser-deeplink

Redirect mobile website users to your native iOS and/or Android app
MIT License
493 stars 173 forks source link

Not working with iOS #23

Open agravatfemina opened 7 years ago

agravatfemina commented 7 years ago

I've added this script in web page. When URL opens in Android Device it's working fine. But it is not working iOS device it redirects to APP store..

hassanabidpk commented 7 years ago

Same problem with me. But on iOS it works fine with chrome. Only problem is with Safar. @agravatfemina have you figured it out?

jester6san commented 6 years ago

I confirm the bug on iOS, works in Chrome but not in Safari... is there a fix yet?

TheMrugraj commented 5 years ago

Any solution on this issue ?

WuglyakBolgoink commented 4 years ago

same in 2020 :(

@hassanabidpk , @TheMrugraj , @agravatfemina , @jester6san any updates or workaround in this issue?

clenemt commented 3 years ago

The problem is as follow:

  // Safari only supports src redirect
  // iOS supports all excepts src redirect
  iframe.src = isDesktopSafari() ? getRedirectURL() : '';
  iframe.onload = () => {
    iframe.parentNode.removeChild(iframe);
    window.location.href = getRedirectURL();
  }