title: How to Programmatically check and open an existing app in - Swift 4
body: <p>I want to check whether an app is installed in my phone or not. If it is already installed I want to launch the same. If it not installed I need to open the Appstore link.</p>
  
  <p>I could opened the Appstore from the url,</p>
  
  <pre><code>https://itunes.apple.com/us/app/stack-ar/id1269638287?mt=8
  </code></pre>
  
  <p>by using the below code,</p>
  
  <pre><code>let urlString = "https://itunes.apple.com/us/app/stack-ar/id1269638287?mt=8"
  UIApplication.shared.open(URL(string: urlString)!, options: [:]) { (success) in
  
          }
  </code></pre>
  
  <p>How can I open the app if it is installed?</p>