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
If the URL scheme for your app is "myapp:", then
BOOL myAppInstalled = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"myapp:"]];
(Requires iOS 3.0.)