title: Redirect to application if installed, otherwise to App Store
body: <p>I know it's possible to link directly to an app in iOS by registering a custom scheme (e.g. so://) and it's also possible to link to the app in the appstore via itunes.</p>
  
  <p>In many cases, the ideal flow is to provide a link that redirects to the app <em>if</em> it's installed and to the store if not. Is this possible, and if so, how?</p>
  
  <p><strong>Added for clarity</strong>, the scenario is I'm opening a link (http) from an e-mail on my iphone that's inviting me to join a group in an application. If the user has the app installed on that device it should open, otherwise the http link should redirect to itunes.</p>