0

I've a link like www.mydomain.com/myapp and it is able to deep link to my react native expo app correctly if opened from email or chat. My react app redirects that link to playstore/appstore in case it is opened in desktop.

const MyAppRedirect = (): JSX.Element => {
const userAgent = navigator.userAgent || navigator.vendor;

  if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
    window.location.replace(<appstore link>);
  } else {
    window.location.replace(<playstore link>);
  }

  return null;
};

export default MyAppRedirect;

I have another webpage that links to this www.mydomain.com/myapp

<a href="/myapp">Click here</a>

but when opened using Android's Chrome browser or IOS browser, it is not linking to the installed app. I tried this too:

<a href="www.mydomain.com/myapp">Click here</a>

It still doesn't work. Is my only option using the custom scheme? Thanks

nanakondor
  • 615
  • 11
  • 25
  • Were you able to solve this issue? – kenrickvaz Jul 12 '22 at 21:10
  • @kenrickvaz yes, turns out if the deep link is the same domain as the page, it wont be able to link to the app correctly. https://stackoverflow.com/questions/47117683/deep-link-wont-work-if-opened-from-the-same-domain – nanakondor Jul 13 '22 at 06:06

0 Answers0