zoukankan      html  css  js  c++  java
  • NSPhotoLibraryAddUsageDescription解决办法

    图片并保存到本地的功能,一点发现闪退了。发现 Xcode 报以下错误:

    The app's Info.plist must contain an NSPhotoLibraryAddUsageDescription key with a string value explaining to the user how the app uses this data.

    解决方案

    Info.plist 里面要涉及隐私数据时要添加一句“提示语”。打开 Info.plist  点击 + 号,在 Key 中输入:Privacy - Photo Library Additions Usage Description,Type 选择 String,Value 中输入你保存图片的用途提示语。
    下面是项目用到的所有Info.plist中权限 以及提示语  上架的时候如果你没有说明访问相册的用途会 审核不通过 审核不通过 审核不通过  其他的权限一样要写明用途
    <key>NSAppleMusicUsageDescription</key>
        <string>App需要您的同意,才能访问媒体资料库</string>
        <key>NSBluetoothPeripheralUsageDescription</key>
        <string>App需要您的同意,才能访问蓝牙</string>
        <key>NSCalendarsUsageDescription</key>
        <string>App需要您的同意,才能访问日历</string>
        <key>NSCameraUsageDescription</key>
        <string>App需要您的同意,才能访问相机上传评价图片</string>
        <key>NSContactsUsageDescription</key>
        <string>contactsDesciption</string>
        <key>NSHealthShareUsageDescription</key>
        <string>App需要您的同意,才能访问健康分享</string>
        <key>NSHealthUpdateUsageDescription</key>
        <string>App需要您的同意,才能访问健康更新 </string>
        <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
        <string>我们需要通过您的地理位置信息获取您周边的相关店铺数据</string>
        <key>NSLocationAlwaysUsageDescription</key>
        <string>App需要您的同意,才能始终访问位置用于定位您的城市名</string>
        <key>NSLocationUsageDescription</key>
        <string>App需要您的同意,才能访问位置用于定位您的城市名</string>
        <key>NSLocationWhenInUseUsageDescription</key>
        <string>App需要您的同意,用于显示所在城市名称</string>
        <key>NSMicrophoneUsageDescription</key>
        <string>App需要您的同意,才能访问麦克风用于语音收索服务</string>
        <key>NSMotionUsageDescription</key>
        <string>App需要您的同意,才能访问运动与健身</string>
        <key>NSPhotoLibraryUsageDescription</key>
        <string>App需要您的同意,才能访问相册用于上传评价图片</string>
        <key>NSPhotoLibraryAddUsageDescription</key>
        <string>App需要您的同意,用于保存图片到手机</string>
        <key>NSRemindersUsageDescription</key>
        <string>App需要您的同意,才能访问提醒事项</string>
        <key>UIRequiredDeviceCapabilities</key>
  • 相关阅读:
    Bzoj 2748: [HAOI2012]音量调节 动态规划
    Bzoj 1222: [HNOI2001]产品加工 动态规划
    Bzoj 2763: [JLOI2011]飞行路线 拆点,分层图,最短路,SPFA
    Bzoj 2718: [Violet 4]毕业旅行 && Bzoj 1143: [CTSC2008]祭祀river 传递闭包,二分图匹配,匈牙利,bitset
    Bzoj 1612: [Usaco2008 Jan]Cow Contest奶牛的比赛 传递闭包,bitset
    Hdu 5036-Explosion 传递闭包,bitset,期望/概率
    Bzoj 1703: [Usaco2007 Mar]Ranking the Cows 奶牛排名 传递闭包,bitset
    Bzoj 1696: [Usaco2007 Feb]Building A New Barn新牛舍 中位数,数学
    最小公倍数(LCM)
    最大公约数(GCD)
  • 原文地址:https://www.cnblogs.com/dujiahong/p/9583077.html
Copyright © 2011-2022 走看看