-
-
Notifications
You must be signed in to change notification settings - Fork 225
Open
Labels
Description
Environment
.Net MAUI 8.0
iPhone 14 Pro Max
iOS 18.3.2
I'm advertising a GATT service from a Raspberry pi and would like to communicate with that service from an Android & iOS app.
I'm finding the devices using:
var filter = new BluetoothLEScanFilter();
filter.NamePrefix = "RASPBERYPI";
var options = new RequestDeviceOptions();
options.Filters.Add(filter);
var devices = await Bluetooth.ScanForDevicesAsync(options);
This works fine when I debug on Android. It's turning up empty (immediately) when I debug on iOS.
I do get back PermissionStatus.Granted when I request them:
PermissionStatus status = PermissionStatus.Unknown;
if ((await Permissions.CheckStatusAsync<Permissions.Bluetooth>()) != PermissionStatus.Granted)
{
status = await Permissions.RequestAsync<Permissions.Bluetooth>();
}
And I've also added bluetoothle to the required device capabilities:
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
<string>BluetoothLE</string>
</array>
(I've also tried adding the NSBluetoothAlwaysUsageDescription key's and the UIBackgroundModes bluetooth keys).
I'm not sure what to try next.
Any help or at least direction would be greatly appreciated.
Reactions are currently unavailable