Skip to content

iOS9检测微信、百度地图等三方安装 #10

@dabing1022

Description

@dabing1022

在iOS9以前,检测微信是否安装,用微信SDK中的[WXApi isWXAppInstalled]来检测就可以了,但在iOS9之后,需要在Info.plist中将要使用的URL Schemes列为白名单,才可正常检查应用是否安装。

<key>LSApplicationQueriesSchemes</key>
    <array>
        <string>wechat</string>
        <string>weixin</string>
        <string>baidumap</string>
        <string>iosamap</string>
                <string>mqq</string>
                <string>weibo</string>
                <string>tencentweibo</string>
                <string>sinaweibo</string>
    </array>
<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

常用App URL Scheme

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions