I am migrating a Xamarin.Kinds app to MAUI, so my answer nonetheless has:
Shared venture
Android venture
iOS venture
My iOS venture had all requirement to ask the person for Bluetooth permission,
which means all required strings in information.plist:
NSBluetoothPeripheralUsageDescription
NSBluetoothAlwaysUsageDescription
Privateness - Bluetooth Peripheral Utilization Description
Privateness - Bluetooth At all times Utilization Description
permission service in shared venture and suppliers in every platform.
The iOS supplier create the CBCentralManager occasion,
and upon creation the person is meant to get the alert asking for Bluetooth permission:
public async Job<bool> RequestBluetoothPermission()
{
var supervisor = new CBCentralManager(null, null, new CBCentralInitOptions { });
var state = supervisor.State == CBManagerState.PoweredOn;
}
In my migrated app, this doesn’t occur on iOS.
The supervisor is created, its state is CBManagerState.Unknown, and the alert would not present.
Does anybody understand how get the migrated Maui app to ask for Bluetooth permission?