2

I'd like to post a URL on my site which, when clicked, either opens up my iphone app (if it's been installed on the phone), or, if the app hasn't been installed, opens up itunes with my application, to allow it to be installed.

This seems like a basic sort of thing that might be quickly done with a magic formula URL, but I can't seem to find the relevant documentation anywhere.

blueberryfields
  • 45,910
  • 28
  • 89
  • 168
  • my requirement is also the same.. i opened the app if the app is installed, i am not getting any idea how to handle if the app is not installed in my iOS device... i am send the url like this appname://example.com – S P Balu Kommuri Jan 13 '15 at 05:47

1 Answers1

4

This is exactly what Smart App Banners in iOS 6 are for:

http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html

"If the app is already installed on a user's device, the banner intelligently changes its action, and tapping the banner will simply open the app. If the user doesn’t have your app on his device, tapping on the banner will take him to the app’s entry in the App Store."

Brian Criscuolo
  • 181
  • 1
  • 5