美文网首页
代码打开app,并判断是否安装app

代码打开app,并判断是否安装app

作者: 一枚64byte的仙女 | 来源:发表于2019-10-14 17:21 被阅读0次

常见的app的sheme名字如下:


<key>LSApplicationQueriesSchemes</key>

<array>

<!-- 微信 URL Scheme 白名单-->

<string>wechat</string>

<string>weixin</string>

<!-- 新浪微博 URL Scheme 白名单-->

<string>sinaweibohd</string>

<string>sinaweibo</string>

<string>sinaweibosso</string>

<string>weibosdk</string>

<string>weibosdk2.5</string>

<!-- QQ、Qzone URL Scheme 白名单-->

<string>mqqapi</string>

<string>mqq</string>

<string>mqqOpensdkSSoLogin</string>

<string>mqqconnect</string>

<string>mqqopensdkdataline</string>

<string>mqqopensdkgrouptribeshare</string>

<string>mqqopensdkfriend</string>

<string>mqqopensdkapi</string>

<string>mqqopensdkapiV2</string>

<string>mqqopensdkapiV3</string>

<string>mqzoneopensdk</string>

<string>wtloginmqq</string>

<string>wtloginmqq2</string>

<string>mqqwpa</string>

<string>mqzone</string>

<string>mqzonev2</string>

<string>mqzoneshare</string>

<string>wtloginqzone</string>

<string>mqzonewx</string>

<string>mqzoneopensdkapiV2</string>

<string>mqzoneopensdkapi19</string>

<string>mqzoneopensdkapi</string>

<string>mqzoneopensdk</string>

<!-- 支付宝 URL Scheme 白名单-->

<string>alipay</string>

<string>alipayshare</string>

</array>

在"Info.plist"中进行配置

代码判断是否安装app:

if(![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"alipay://"]]) {

    NSLog(@"UnInstall alipay");

    return;

}

相关文章

网友评论

      本文标题:代码打开app,并判断是否安装app

      本文链接:https://www.haomeiwen.com/subject/duarmctx.html