iOS白名单和系统权限的配置

iOS 9后用到第三方时需要将在“Info.plist”中将要使用的URL Schemes列为白名单。常用第三方白名单,在“Info.plist”里增加如下代码:

<key>LSApplicationQueriesSchemeskey>
 <array>
    
    <string>wechatstring>
    <string>weixinstring>

    
    <string>sinaweibohdstring>
    <string>sinaweibostring>
    <string>sinaweibossostring>
    <string>weibosdkstring>
    <string>weibosdk2.5string>

    
    <string>mqqapistring>
    <string>mqqstring>
    <string>mqqOpensdkSSoLoginstring>
    <string>mqqconnectstring>
    <string>mqqopensdkdatalinestring>
    <string>mqqopensdkgrouptribesharestring>
    <string>mqqopensdkfriendstring>
    <string>mqqopensdkapistring>
    <string>mqqopensdkapiV2string>
    <string>mqqopensdkapiV3string>
    <string>mqzoneopensdkstring>
    <string>wtloginmqqstring>
    <string>wtloginmqq2string>
    <string>mqqwpastring>
    <string>mqzonestring>
    <string>mqzonev2string>
    <string>mqzonesharestring>
    <string>wtloginqzonestring>
    <string>mqzonewxstring>
    <string>mqzoneopensdkapiV2string>
    <string>mqzoneopensdkapi19string>
    <string>mqzoneopensdkapistring>
    <string>mqzoneopensdkstring>

    
    <string>alipaystring>
    <string>alipaysharestring>

array>

iOS 10之后用到系统相关功能的时候需要用户的手动确认,如相册、相机等,在“Info.plist”里增加如下代码:

 
<key>NSPhotoLibraryUsageDescriptionkey> 
<string>App需要您的同意,才能访问相册string> 
 
<key>NSCameraUsageDescriptionkey> 
<string>App需要您的同意,才能访问相机string> 
 
<key>NSMicrophoneUsageDescriptionkey> 
<string>App需要您的同意,才能访问麦克风string> 
 
<key>NSLocationUsageDescriptionkey> 
<string>App需要您的同意,才能访问位置string> 
 
<key>NSLocationWhenInUseUsageDescriptionkey> 
<string>App需要您的同意,才能在使用期间访问位置string> 
 
<key>NSLocationAlwaysUsageDescriptionkey> 
<string>App需要您的同意,才能始终访问位置string> 
 
<key>NSCalendarsUsageDescriptionkey> 
<string>App需要您的同意,才能访问日历string> 
 
<key>NSRemindersUsageDescriptionkey> 
<string>App需要您的同意,才能访问提醒事项string> 
 
<key>NSMotionUsageDescriptionkey> <string>App需要您的同意,才能访问运动与健身string> 
 
<key>NSHealthUpdateUsageDescriptionkey> 
<string>App需要您的同意,才能访问健康更新 string> 
 
<key>NSHealthShareUsageDescriptionkey> 
<string>App需要您的同意,才能访问健康分享string> 
 
<key>NSBluetoothPeripheralUsageDescriptionkey> 
<string>App需要您的同意,才能访问蓝牙string> 
 
<key>NSAppleMusicUsageDescriptionkey> 
<string>App需要您的同意,才能访问媒体资料库string>

你可能感兴趣的:(iOS开发,iOS开发)