title: How can I programmatically determine if a URL is a Universal Link or just a regular web URL?
body: <p>On iOS, how can I programmatically determine if a URL is a Universal Link or just a regular web URL?</p>
  
  <p>Let's say you are about to launch the URL <a href="http://www.yelp.com" rel="noreferrer">http://www.yelp.com</a> from your own iOS app.  (<a href="http://www.yelp.com" rel="noreferrer">http://www.yelp.com</a> is a fully registered universal link.)  </p>
  
  <p>Case one) the user doesn't have the app installed -> You want to show them the website in an <strong>IN-APP</strong> webview.</p>
  
  <p>Case two) the user does have the app installed -> You want to <strong>launch out of your app</strong> and deep link directly to the the yelp app by using  [[UIApplication sharedApplication] openURL:URL]; instead of presenting a webview in app.</p>
  
  <p><strong>Here is the problem:</strong> 
  <em>All you get to work with is the string url: "<a href="http://www.yelp.com" rel="noreferrer">http://www.yelp.com</a>"</em>   Your goal is to launch out to the yelp app if installed but present an in-app webview if yelp is not installed. </p>
  
  <p><strong>Note 1: This question is only about universal links. Please do not give answers which use URL Schemes.</strong></p>
  
  <p><strong>Note 2: This question is not about specifically launching the yelp app. The solution should work for any url to determine if it is a universal link of an installed app.</strong></p>
  
  <p>Can you do this?  </p>