在iOS10中,如果你的App想要访问用户的相机、相册、麦克风、通讯录等等权限,都需要进行相关的配置,不然会直接crash。
需要在info.plist中添加App需要的一些设备权限。
NSBluetoothPeripheralUsageDescription
访问蓝牙
NSCalendarsUsageDescription
访问日历
NSCameraUsageDescription
相机
NSPhotoLibraryUsageDescription
相册
NSContactsUsageDescription
通讯录
NSLocationAlwaysUsageDescription