Xcode 8 打开相机crash问题

升级Xcode8 之后打开项目,打开相册,立即崩溃,打印出的日志如下:

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.

意思是说:你需要在info.plist文件 添加一个NSContactsUsageDescription的Key,Value添加一个描述。

相机权限描述:
    NSCameraUsageDescription   
    cameraDesciption
通信录: 
    NSContactsUsageDescription   
    contactsDesciption
麦克风:   
    NSMicrophoneUsageDescription   
    microphoneDesciption
相册:    
    NSPhotoLibraryUsageDescription    
    photoLibraryDesciption

你可能感兴趣的:(Xcode 8 打开相机crash问题)