I have an app and when a uibutton is clicked, I want to open another app that is already installed (i.e. Waze). How can I do such? Big thanks.
Try this. For example you want to open an Instagram app:
var instagramHooks = "instagram://user?username=johndoe"
var instagramUrl = NSURL(string: instagramHooks)
if UIApplication.sharedApplication().canOpenURL(instagramUrl!)
{
UIApplication.sharedApplication().openURL(instagramUrl!)
} else {
//redirect to safari because the user doesn't have Instagram
UIApplication.sharedApplication().openURL(NSURL(string: "http://instagram.com/")!)
}