• iOS10相机等崩溃


    当使用iOS10使用相机时会出现崩溃

        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.

    有如下常用字段
    • NSContactsUsageDescription -> 通讯录

    • NSMicrophoneUsageDescription -> 麦克风

    • NSPhotoLibraryUsageDescription -> 相册

    • NSCameraUsageDescription -> 相机

    • NSLocationAlwaysUsageDescription -> 地理位置

    • NSLocationWhenInUseUsageDescription -> 地理位置

    我们需要在info.plist中设置提醒,在iOS10之前默认就给设置了

    <key>NSCameraUsageDescription</key>    
    <string>cameraDesciption</string>
    <key>NSContactsUsageDescription</key>
    <string>contactsDesciption</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>microphoneDesciption</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>photoLibraryDesciption</string>
  • 相关阅读:
    文档注释
    配置环境变量
    Java编译-->运行
    DOS命令(日后补充)
    字符、字符串函数
    输入字符串,逆序输出
    求矩阵最大元素值,以及行号和列号
    Apache和Tomcat的区别
    C# params关键字
    JSP的隐式对象(session)
  • 原文地址:https://www.cnblogs.com/qiutangfengmian/p/6069800.html
Copyright © 2020-2023  润新知