The app's Info.plist file should contain a NSBluetoothAlwaysUsageDescription key while the key is in the plist file

后端 未结 6 2091
忘掉有多难
忘掉有多难 2021-01-03 19:51

First of all, I would like to state that I already looked at Stack Overflow post here and adding either the one mentioned by either iCoder & Deepak didn\'t solve the pro

6条回答
  •  温柔的废话
    2021-01-03 20:24

    I got the root cause

    We have below two default options in plist to enter the bluetooth usage.

    1.Privacy - Bluetooth Peripheral Usage Description 2.Privacy - Bluetooth Always Usage Description

    But Xcode save this option in the source code like the below

    1.NSBluetoothPeripheralUsageDescription instead of Privacy - Bluetooth Peripheral Usage Description

    2.Privacy - Bluetooth Always Usage Description instead of Privacy - Bluetooth Always Usage Description

    So now the point is NSBluetoothPeripheralUsageDescription is deprecated and its expecting the key "NSBluetoothAlwaysUsageDescription"

    Here is the solution, open the plist file as source code in Xcode and copy-paste the below key-value pair

    Key: NSBluetoothAlwaysUsageDescription Value: This application requires bluetooth in order to bla bla bla.

提交回复
热议问题