更新时间:2022-03-14 16:48:10
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