zoukankan      html  css  js  c++  java
  • iOS 10权限崩溃问题

    手机升级到iOS10 Beta版本后,再次进行真机调试时会遇见权限崩溃问题,崩溃原因如下:This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data  意思是说:你需要在info.plist文件 添加一个“NSContactsUsageDescription ”的Key,Value添加一个描述。

    修改方法如下:

    1,在项目中找到info.plist文件,右击有个 Open As,以Source Code 的形式打开

    2,分别复制 以下 Value 和Key,Key 一定不能错,Value 貌似可以随便填写

    相机权限描述:

        <key>NSCameraUsageDescription</key>
        <string>cameraDesciption</string>

    通信录:
        <key>NSContactsUsageDescription</key>
        <string>contactsDesciption</string>

    麦克风:
        <key>NSMicrophoneUsageDescription</key>
        <string>microphoneDesciption</string>

    相机:
        <key>NSPhotoLibraryUsageDescription</key>
        <string>photoLibraryDesciption</string>

    3,在info.plist 文件上 复制上,然后 保存,如下图:

    Source Code 的形式:

    4,Clean之后,运行就OK了。

  • 相关阅读:
    HashMap 的数据结构
    JVM的内存区域划分
    分库分表的基本思想
    分表与分库使用场景以及设计方式
    千万数据的分库分表(一)
    用c++实现快速排序和归并排序
    如何查看python版本号?
    python的正则表达式
    python3的队列,比python2更好
    markdown如何插入代码?
  • 原文地址:https://www.cnblogs.com/Yun-Longcom/p/5941107.html
Copyright © 2011-2022 走看看