APP is determined whether a mounted Swift

In the first project which added info.plist, you have to determine which of APP Add URL Schemes!


1684920-046d55d101272edb.png
Screenshot
//是否安装APP
    func isInstallation(urlString:String?) -> Bool {
        let url = URL(string: urlString!)
        if url == nil {
            return false
        }
        if UIApplication.shared.canOpenURL(url!) {
            return true
        }
        return false
    }

Reproduced in: https: //www.jianshu.com/p/52dec7333a96

Guess you like

Origin blog.csdn.net/weixin_34319374/article/details/91163473