Is there a function which I can use to check if the user has a particular app installed on their device. Ie, instagram
Asked
Active
Viewed 4,113 times
1 Answers
6
class func isAppInstalled(_ appName:String) -> Bool{
let appScheme = "\(appName)://app"
let appUrl = URL(string: appScheme)
if UIApplication.shared.canOpenURL(appUrl! as URL){
return true
} else {
return false
}
}
Add the name of the app you are checking to LSApplicationQueriesSchemes in your info.plist file

Jase Whatson
- 4,179
- 5
- 36
- 45