From 794ff506fa2c12dde62440f6cd46f7d58815b045 Mon Sep 17 00:00:00 2001 From: David Humphreys Date: Sun, 15 Nov 2026 13:34:21 +0000 Subject: [PATCH 1/2] Add net11.0 targets alongside net10.0 Add net11.0, net11.0-android, -ios, -maccatalyst, -macos, -tvos and -windows10.0.19041.0 next to the net10.0 targets, let global.json roll forward to the .NET 11 SDK, and install the 10.x and 11.x SDKs in the CI and release workflows. The library has no Microsoft.Extensions or MAUI package references, so no package versions change. --- .github/workflows/ci.yml | 4 +++- .github/workflows/release.yml | 4 +++- .../DSoft.System.BluetoothLe.csproj | 10 ++++++---- README.md | 10 ++++++++-- global.json | 2 +- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcfce53..20886bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,9 @@ jobs: - uses: actions/setup-dotnet@v6 with: - dotnet-version: '10.x' + dotnet-version: | + 10.x + 11.x - name: Restore workloads run: dotnet workload restore DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a7284e..7c80d1a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,9 @@ jobs: - uses: actions/setup-dotnet@v6 with: - dotnet-version: '10.x' + dotnet-version: | + 10.x + 11.x - name: Version id: version diff --git a/DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj b/DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj index ad3e74b..314ad4b 100644 --- a/DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj +++ b/DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj @@ -1,8 +1,8 @@ - netstandard2.0;net10.0;net10.0-android;net10.0-ios;net10.0-maccatalyst;net10.0-macos;net10.0-tvos; - $(TargetFrameworks);net10.0-windows10.0.19041.0;net481; + netstandard2.0;net10.0;net10.0-android;net10.0-ios;net10.0-maccatalyst;net10.0-macos;net10.0-tvos;net11.0;net11.0-android;net11.0-ios;net11.0-maccatalyst;net11.0-macos;net11.0-tvos; + $(TargetFrameworks);net10.0-windows10.0.19041.0;net11.0-windows10.0.19041.0;net481; @@ -51,6 +51,8 @@ BluetoothLe dotnet android ios macos maccatalyst windows wpf netstandard tvos Copyright © 2026 DSoft + Adds net11.0 targets (net11.0, android, ios, maccatalyst, macos, tvos and windows) alongside net10.0. + 4.1 - adds bonding and the GATT status on failures. Device.BondState reports a device's bond (pairing) state, and on Android Adapter.DeviceBondStateChanged is raised when it changes. DeviceBondState gains Unknown, declared last so existing values are unchanged, which Apple platforms always report because CoreBluetooth does not @@ -165,7 +167,7 @@ - + @@ -176,7 +178,7 @@ - diff --git a/README.md b/README.md index b0bf55a..4b92f5f 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,19 @@ The library started as a fork/repackage of [Plugin.BLE](https://github.com/dotne | Target | Minimum OS | | --- | --- | | `net10.0-android` | Android API 21 | +| `net11.0-android` | Android API 21 | | `net10.0-ios` | iOS 15.0 | +| `net11.0-ios` | iOS 15.0 | | `net10.0-maccatalyst` | Mac Catalyst 15.0 | +| `net11.0-maccatalyst` | Mac Catalyst 15.0 | | `net10.0-macos` | macOS 15.0 | +| `net11.0-macos` | macOS 15.0 | | `net10.0-tvos` | tvOS 15.0 | +| `net11.0-tvos` | tvOS 15.0 | | `net10.0-windows10.0.19041.0` | Windows 10 1809 | +| `net11.0-windows10.0.19041.0` | Windows 10 1809 | | `net481` | Windows 10 1809 | -| `net10.0` / `netstandard2.0` | API surface only; platform Bluetooth calls throw on unsupported platforms | +| `net10.0` / `net11.0` / `netstandard2.0` | API surface only; platform Bluetooth calls throw on unsupported platforms | ## Install @@ -233,7 +239,7 @@ A peripheral that requires an encrypted link only answers a central it is bonded | Android | `NotBonded`, `Bonding` or `Bonded`, read from the system on every call | Raised on the main thread for every bond change the system broadcasts, including changes made in the system Bluetooth settings | | iOS, macOS, Mac Catalyst, tvOS | Always `Unknown` | Never raised | | Windows | `Bonded` or `NotBonded`, from the device's pairing information | Never raised | -| `net10.0` / `netstandard2.0` | Always `Unknown` | Never raised | +| `net10.0` / `net11.0` / `netstandard2.0` | Always `Unknown` | Never raised | **Apple platforms.** CoreBluetooth gives an app no way to read or request a bond. The operating system pairs on demand: the first time the app reads, writes or subscribes to a characteristic the peripheral protects, iOS shows the pairing prompt itself, and once the user accepts the link is encrypted for that and later operations. If the user declines, or the peripheral has lost its keys (for example after a factory reset), the operation fails, and the user has to remove the device in Settings > Bluetooth before pairing again. Design the app around attempting the protected operation and handling its failure, not around checking the bond first. diff --git a/global.json b/global.json index 512142d..4ae80ef 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { "version": "10.0.100", - "rollForward": "latestFeature" + "rollForward": "latestMajor" } } From 207f7347f652e9eca70d9044f18c9020f1b9941a Mon Sep 17 00:00:00 2001 From: David Humphreys Date: Sun, 15 Nov 2026 15:18:32 +0000 Subject: [PATCH 2/2] Raise the net11.0-android minimum to API 24 The .NET 11 Android SDK rejects a SupportedOSPlatformVersion below 24 (XA4216). net10.0-android stays at API 21. --- DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj | 2 ++ README.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj b/DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj index 314ad4b..0da67ee 100644 --- a/DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj +++ b/DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj @@ -126,6 +126,8 @@ 15.0 15.0 21.0 + + 24.0 10.0.17763.0 10.0.17763.0 6.5 diff --git a/README.md b/README.md index 4b92f5f..81baeac 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The library started as a fork/repackage of [Plugin.BLE](https://github.com/dotne | Target | Minimum OS | | --- | --- | | `net10.0-android` | Android API 21 | -| `net11.0-android` | Android API 21 | +| `net11.0-android` | Android API 24 | | `net10.0-ios` | iOS 15.0 | | `net11.0-ios` | iOS 15.0 | | `net10.0-maccatalyst` | Mac Catalyst 15.0 |