title: URL Link to redirect to App Store download
body: <p>I'm creating a Reactjs website to redirect user to the App Store automatically after they scan the QR code. It works on browser, however it does not work on iOS device safari. Here's the code</p>
  
  <pre><code>import React from "react";
  
  class App extends React.Component {
  
    constructor(props) {
      super(props);
      this.state = {date: new Date()};
    }
  
    openNewWindow() {
      window.open("https://apps.apple.com/us/app/google-maps-transit-food/id585027354", "_blank") //to open new page
  
    }
  
    componentDidMount() {
      window.open("https://apps.apple.com/us/app/google-maps-transit-food/id585027354", "_blank") //to open new page
    }
  
    render() {
      return (
        &lt;button
          type="button"
          className="btn btn-default pull-right"
          onClick={this.openNewWindow}
        &gt;
          Open Another Window
        &lt;/button&gt;
      );
    }
  }
  
  export default App;
  </code></pre>
  
  <p>Another issue is how do I close the current tab after redirecting to App Store app?</p>
  
  <p>The behaviour is similar to what is offered by <a href="https://apps.apple.com/" rel="nofollow noreferrer">onelink</a></p>