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..0da67ee 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 @@ -124,6 +126,8 @@ 15.0 15.0 21.0 + + 24.0 10.0.17763.0 10.0.17763.0 6.5 @@ -165,7 +169,7 @@ - + @@ -176,7 +180,7 @@ - diff --git a/README.md b/README.md index b0bf55a..81baeac 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 24 | | `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" } }