native.js 判断是否安装某app

1
2
3
4
5
6
7
8
9
10
11
12
13
例:是否安装微信
 
      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

posted on   童彪  阅读(173)  评论(0编辑  收藏  举报

努力加载评论中...

导航

点击右上角即可分享
微信分享提示