第三方app端
image.pngdemo app端
- 跳转代码
let urlString = "weixin://"
let url = URL(string: urlString)
if UIApplication.shared.canOpenURL(url!) {
UIApplication.shared.open(url!)
}else{
let appString = "https://www.apple.com/itunes/"
let appUrl = URL(string: appString)
UIApplication.shared.open(appUrl!)
}
- 添加属性
info.plist源码视图下添加:
<key>LSApplicationQueriesSchemes</key>
<array>
<!-- weixin URL Scheme 白名单-->
<string>weixin</string>
</array>
网友评论