例:是否安装微信 function isWeixin() { var UIApplication = plus.ios.importClass("UIApplication"); var NSURL = plus.ios.importClass("NSURL"); var app = UIApplication.sharedApplication(); var bdScheme = NSURL.URLWithString("baidumap://"); var install = app.canOpenURL(bdScheme); plus.ios.deleteObject(bdScheme); plus.ios.deleteObject(app); }
检查app是否存在 canOpenURL
常用的 https://blog.csdn.net/Maple_ROSI/article/details/79470056