【问题标题】:Not Getting Bluetooth Authorization Prompt in Xamarin iOS在 Xamarin iOS 中未获得蓝牙授权提示
【发布时间】:2020-02-02 16:25:00
【问题描述】:

我有一个 Xamarin Forms 应用程序,它绑定到在 iOS 12 上运行良好的原生蓝牙 SDK。

在 iOS 13 上,应用程序崩溃。我假设这是围绕新的蓝牙隐私设置。

但是尽管初始化了一个 CBCentralManager 的实例。我没有收到权限提示。

我的应用在设置中也没有蓝牙权限选项。

任何指导将不胜感激。

【问题讨论】:

    标签: bluetooth ios13 cbcentralmanager


    【解决方案1】:

    今天开始工作,我用 Info.plist 中的新隐私条目“NSBluetoothAlwaysUsageDescription”修复了它。

    所以尝试将以下行添加到您的 Info.plist:

    <key>NSBluetoothPeripheralUsageDescription</key> <string>My description for what i need Bluetooth Privs</string> <key>NSBluetoothAlwaysUsageDescription</key> <string>My description for what i need Bluetooth Privs</string>

    问候

    【讨论】:

    • Tnx 给你!!我没有发现有关此权限的任何提及。您从哪里找到有关这方面的信息?
    • 我在这个网站上找到了它:blog.estimote.com/post/186160021855/…
    • 在 VS 2019 mac 中,这两个权限需要通过文本编辑器在 info.plist 中添加,否则崩溃仍然存在。谢谢@Sascha。
    猜你喜欢
    • 2021-05-13
    • 2020-02-15
    • 1970-01-01
    • 1970-01-01
    • 2021-02-25
    • 2020-03-25
    • 2022-10-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多