This app has crashed because it attempted to access privacy-sensitive data without a usage descripti

运行环境

    XCode 8.2.1

问题描述

    当调取相册的时候APP崩溃并显示标题的错误:This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.
这里写图片描述

问题分析

    iOS进入10时代之后在Info.plist需要加入NSPhotoLibraryUsageDesciption这个key,value值是一个string值用来描述APP将如何描述这个数据将如何使用。

解决方案

    在Info.plist文件中加入NSPhotoLibraryUsageDesciption即可。
这里写图片描述
这里写图片描述

posted @ 2017-01-25 13:56  MrYu4  阅读(93)  评论(0编辑  收藏  举报