[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothAlwaysUsageDescription key with a string value explaining to the user how the app uses this data.
原因是如果需要适配iOS 13则需要添加 NSBluetoothAlwaysUsageDescription
对于iOS 13及以上版本的应用,可以使用NSBluetoothAlwaysUsageDescription
。
对于iOS 13之前的部署目标,将NSBluetoothAlwaysUsageDescription
和NSBluetoothPeripheralUsageDescription
同时添加到应用程序的文件中。运行早期iOS版本的设备依赖于NSBluetoothPeripheralUsageDescription
,而运行后期版本的设备依赖于NSBluetoothAlwaysUsageDescription
。
即Plist文件中需要存在两份