最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin.bluetoothle - Unable to Initialize Plugin.BlutoothLE in Maui ios Plateform - Stack Overflow

programmeradmin3浏览0评论

I am using the Plugin.BluetoothLE package in my .NET 8 MAUI project. It works perfectly on Android, but in iOS, the application crashes because the plugin fails to initialize. In my View Model, I am initializing the adapter as follows:

private IAdapter Adapter => CrossBleAdapterCurrent; 
However, CrossBleAdapter.Current returns null on iOS, causing the crash.

Permissions Setup (Info.plist): I have correctly set the required Bluetooth and Location permissions in Info.plist. I have added UIBackgroundModes for both central and peripheral. I have added NSBluetoothPeripheralUsageDescription, NSBluetoothAlwaysUsageDescription, NSLocationWhenInUseUsageDescription, NSLocationAlwaysAndWhenInUseUsageDescription

Despite setting up permissions correctly, CrossBleAdapter.Current is returning null on iOS. What am I missing in my MAUI .NET 8 setup to resolve this issue?

发布评论

评论列表(0)

  1. 暂无评论