I want to check whether an app is present in my iphone or not. If it is present I want to launch it else open the App Store link of the app.
Please suggest the required
You can check if the respective device has an app is installed using:
// url = "example" (check the following image to understand)
let canOpen = UIApplication.sharedApplication().canOpenURL(NSURL(string: url as String)!)
Where url
is pre configured (have a URL scheme registered for your app in your Info.plist)
So, if canOpen is true
means that app is installed and you can open using:
UIApplication.sharedApplication().openURL(NSURL(string:url)!)