zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    windows7触屏编程
    改变窗口大小,恢复以前的大小
    insert()
    index()
    help()
    id()
    extend()
    count()
    cmp()
    append()
  • 原文地址:https://www.cnblogs.com/qiutangfengmian/p/6069800.html
Copyright © 2011-2022 走看看