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
}
}
将要检查的应用程序的名称添加到info.plist文件中的LSApplicationQueriesSchemes