NSBluetoothAlwaysUsageDescription required, but bluetooth is not used

前端 未结 10 1831
青春惊慌失措
青春惊慌失措 2021-01-01 18:28

In my ios app with new Xcode 11 GM Seed 2 after deploy, apple returned error: ITMS-90683: Missing Purpose String in Info.plist with NSBluetoothAlwaysUsageDe

相关标签:
10条回答
  • 2021-01-01 19:23

    Swift 5

    <key>NSBluetoothAlwaysUsageDescription</key>
    <string>App would like to use your bluetooth for communication purposes</string>
    <key>NSBluetoothPeripheralUsageDescription</key>
    <string>App would like to use your bluetooth for communication purposes</string>
    
    0 讨论(0)
  • 2021-01-01 19:26

    A third party library/framework/pod in your app might be using CoreBluetooth. Just add NSBluetoothAlwaysUsageDescription in your Info.plist, error will be gone.

    0 讨论(0)
  • 2021-01-01 19:27

    I've tried Maurice's answer, with and without .framework extension, but did not find any reference to CoreBluetooth in my project. I also had previously in Info.plist file added: "Privacy - Bluetooth Peripheral Usage Description", with String Value: "App would like to use your bluetooth for communication purposes"". This didn't work either.
    Finally after seeing Chase Roberts's answer I added: "NSBluetoothAlwaysUsageDescription", with String value: "App would like to use your bluetooth for communication purposes". After that this error was not shown again for my app while publishing.

    Note: In warning for error: ITMS-90683, for my app was said that delivery was successful, but I can if I wish to make changes in regard to stated issue.

    0 讨论(0)
  • 2021-01-01 19:28

    Open your Info.plist and add a NSBluetoothAlwaysUsageDescription. You can do this in the editor by adding a line item like this:

    Or you can right click on the Info.plist and Open As -> Source Code and paste in the two appropriate lines as xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <plist version="1.0">
    <dict>
        ....
        <key>NSBluetoothPeripheralUsageDescription</key>
        <string>We use Bluetooth to connect to the MantisX hardware device.</string>
        ....
    </dict>
    </plist>
    
    0 讨论(0)
提交回复
热议问题