iOS 10 上传图片、麦克风、相册等等报错问题

更新iOS 10以后上传图片显示权限问题,报错如下:

[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.



解决方案:

在info.plist添加以下key/value:

<!--  Photo Library -->

    <key>NSPhotoLibraryUsageDescription</key>

    <string></string>

    

    <!--  Camera -->

    <key>NSCameraUsageDescription</key>

    <string></string>

    

    <!--  Microphone -->

    <key>NSMicrophoneUsageDescription</key>

    <string></string>

    

    <!--  Location -->

    <key>NSLocationUsageDescription</key>

    <string></string>

    

    <!--  Location When In Use -->

    <key>NSLocationWhenInUseUsageDescription</key>

    <string></string>

    

    <!--  Location Always -->

    <key>NSLocationAlwaysUsageDescription</key>

    <string></string>

    

    <!--  Calendars -->

    <key>NSCalendarsUsageDescription</key>

    <string></string>

    

    <!--  Reminders -->

    <key>NSRemindersUsageDescription</key>

    <string></string>

    

    <!--  Motion -->

    <key>NSMotionUsageDescription</key>

    <string></string>

    

    <!--  Health Update -->

    <key>NSHealthUpdateUsageDescription</key>

    <string></string>

    

    <!--  Health Share -->

    <key>NSHealthShareUsageDescription</key>

    <string></string>

    

    <!--  Bluetooth Peripheral -->

    <key>NSBluetoothPeripheralUsageDescription</key>

    <string></string>

    

    <!--  Media Library -->

    <key>NSAppleMusicUsageDescription</key>

    <string></string>



©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页