I am in this situation where I have to display a button which says \"Open myApp\" (if myApp is installed on the device) or it says \"Download myApp\" (if myApp is not instal
You can add a simple meta tag in the head of any page that needs this app-sniffing.
For more info, go here:
http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html