iOS10+Xcode8

IOS10 Xcode8程序调用相机和相册程序崩溃Crash

2016-09-21  本文已影响29人  Loki_

在iOS10中,如果你的App想要访问用户的相机、相册、麦克风、通讯录等等权限,都需要进行相关的配置,不然会直接crash。

需要在info.plist中添加App需要的一些设备权限

访问蓝牙:NSBluetoothPeripheralUsageDescription

访问日历:NSCalendarsUsageDescription

相机:NSCameraUsageDescription

相册:NSPhotoLibraryUsageDescription

通讯录:NSContactsUsageDescription

始终访问位置:NSLocationAlwaysUsageDescription

位置:NSLocationUsageDescription

在使用期间访问位置:NSLocationWhenInUseUsageDescription

麦克风:NSMicrophoneUsageDescription

访问媒体资料库:NSAppleMusicUsageDescription

访问健康分享:NSHealthShareUsageDescription

访问健康更新:NSHealthUpdateUsageDescription

访问运动与健身:NSMotionUsageDescription

访问提醒事项:NSRemindersUsageDescription

我添加了相机和相册的权限

上一篇下一篇

猜你喜欢

热点阅读