plist文件
允许联网
NSAppTransportSecurity——dictionary
NSAllowsArbitraryLoads——yes
URL scheme白名单
应用程序有分享或跳转到其他平台授权的功能,分享或授权后再跳回来。iOS9需要将你要在外部调用的URL scheme列为白名单,才可以完成跳转,如无则报错。
LSApplicationQueriesSchemes
- 该关键字类型为NSArray;
- 需要添加白名单的App关键字直接以NSString的形式添加在其下面就行;
#####常见第三方App的url Scheme:
- 百度地图:baidumap
- 高德地图:iosamap
- 谷歌地图:comgooglemaps
- 腾讯地图:qqmap
常用的白名单(url Scheme)分类:
LSApplicationQueriesSchemes
//=============地图======
- 百度地图:baidumap
- 高德地图:iosamap
- 谷歌地图:comgooglemaps
- 腾讯地图:qqmap
//=============微信======
wechat
weixin
//==============QQ=====
mqqapi
mqq
mqqOpensdkSSoLogin
mqqconnect
mqqopensdkdataline
mqqopensdkgrouptribeshare
mqqopensdkfriend
mqqopensdkapi
mqqopensdkapiV2
mqqopensdkapiV3
mqzoneopensdk
wtloginmqq
wtloginmqq2
mqqwpa
mqzone
mqzonev2
mqzoneshare
wtloginqzone
mqzonewx
mqzoneopensdkapiV2
mqzoneopensdkapi19
mqzoneopensdkapi
mqzoneopensdk
//=============新浪微博=====
sinaweibohd
sinaweibo
sinaweibosso
weibosdk
weibosdk2.5
//============支付======
alipay
alipayshare
还可以通过另一种方法添加,还是在plist文件里面配置
<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>
参考链接:白名单配置
更新中。。。。
网友评论