iOS常用iOS-swiftiOS-开发

iOS info.plist 中的隐私权限

2019-03-28  本文已影响0人  329fd8af610c

每次用到info.plist 文件中的权限都得进行百度,今天总结一下,方便以后项目中使用
a. 常用权限:

    <key>NSCameraUsageDescription</key>
    <string>"xxx”需要您的同意,才能访问相机,以便于拍照上传头像等"</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>"xxx”需要您的同意,才能访问相册,以便于从相册获取图片上传头像等</string>
    <key>NSPhotoLibraryAddUsageDescription</key>
    <string>“xxx”需要您的同意,才能将保存图片到本地</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>App需要您的同意,才能在使用期间访问位置</string>
    <key>NSLocationUsageDescription</key>
    <string>App需要您的同意,才能访问位置</string>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>App需要您的同意,才能始终访问位置</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>App需要您的同意,才能访问您的麦克风</string>
    <key>NSContactsUsageDescription</key>
    <string>App需要您的同意,才可访问联系人</string>
    <key>NSAppleMusicUsageDescription</key>
    <string>App需要您的同意,才能访问媒体资料库</string>
    <key>NSCalendarsUsageDescription</key>
    <string>App需要您的同意,才能访问日历</string>

b.不常用权限

   <key>NSRemindersUsageDescription</key>
   <string>App需要您的同意,才能访问提醒事项</string>
   <key>NSMotionUsageDescription</key>
   <string>App需要您的同意,才能访问运动与健身</string>
   <key>NSHealthUpdateUsageDescription</key>
   <string>App需要您的同意,才能访问健康更新</string>
   <key>NSHealthShareUsageDescription</key>
   <string>App需要您的同意,才能访问健康分享</string>
   <key>NSBluetoothPeripheralUsageDescription</key>
   <string>App需要您的同意,才能访问蓝牙</string>
   <key>NSSiriUsageDescription</key>
   <string>App需要您的同意,才可访问Siri</string>
   <key>NSHomeKitUsageDescription</key>
   <string>App需要您的同意,才可访问HomeKit</string>
   <key>NSSpeechRecognitionUsageDescription</key>
   <string>App需要您的同意,才可使用语音识别</string>

c.跳转Schemes:LSApplicationQueriesSchemes

<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>
    
    <!-- 地图  URL Scheme 白名单-->
    <string>iosamap</string>
    <string>baidumap</string>
</array>

注:日后还会不定期维护info.plist文件中的权限选项,方便快速查找跟使用。感谢阅读,如有错误不吝赐教!

上一篇下一篇

猜你喜欢

热点阅读