Repository navigation
Merge upstream master: SwiftPM support, AGP 9 / built-in Kotlin, async subscriptions - #3
Merged
Merged
Conversation
This applies the changes from f880ed8 with some additional changes to clean up merge conflicts and fix broken tests.
This refactors the device restoration logic to emit a stream of `RestoredDevice` objects on session restoration. Each device will have a set of metadata as well as streams for the connection state as well as any characteristic subscriptions established in a previous session. Each stream provides the same functionality as a standard connection or characteristic stream and will disconnect/unsubscribe on calling `cancel()`.
This passes an empty restored device info collection to the restored device event stream on Android to ensure the stream will emit a done event.
This doesn't fully prevent duplicate emissions but should ensure duplicates aren't emitted during connection and initial pairing when it is most important.
feat: add support for monitoring ble device bond status changes
…ices and characteristics
Bump patch version 5.4.1
* Bump protobuf to 6.0.0 * Ran protobuf codegen * Bump internal updates * Bump flutter version for flutter workflow image * Bump flutter version for flutter workflow image to 3.41.5 --------- Co-authored-by: PieterAelse <pieter.otten@signify.com>
* Perform SPM migration * Fix Dart analyzer issue --------- Co-authored-by: Rutger Vromans <rutger.vromans@signify.com>
* [REF] Update to match Flutter 3.47 requirements, keep minimum at 3.44 - Upgrade SDK to 37 - Upgrade Kotlin to 2.4.10 - Upgrade AGP to 9.3.1 - Upgrade gradle to 9.5.0 - Migrate to built-in Kotlin
…ilipsHue#945) The existing `subscribe()` method returns a stream immediately, potentially leading to race conditions or unhandled errors if the underlying BLE notification setup fails or is delayed. This new `subscribeAsync()` method waits for the BLE subscription on the native platform to be fully established before returning the stream, providing a more robust and predictable API.
…characteristic subscription Merges PhilipsHue/flutter_reactive_ble master (7ba36e5 PhilipsHue#932, 6b81c85 PhilipsHue#938, e8b43fb PhilipsHue#945) into the fork while keeping session restoration, bond-state monitoring, attach-to-subscription and the proto additions. - iOS sources moved to darwin/reactive_ble_mobile/Sources/reactive_ble_mobile (incl. fork-only BleData extras/RestoredPeripheral.swift); plugin class is now ReactiveBlePlugin. Fork event channels (restored_device, bond_update) use the shared iOS/macOS messenger. - Kept both attachToCharacteristicSubscription (fork) and subscribeToCharacteristicAsync (upstream); restorationKey is passed on Android/iOS/macOS. - Regenerated bledata protobuf (protoc 34.1, protoc_plugin 25.0.0, protoc-gen-swift 1.36.1) from the merged proto, mocks and lock files. - Android build.gradle: took upstream SDK 37 / AGP 9 / built-in Kotlin. Co-authored-by: dballance <1234523+dballance@users.noreply.github.com>
…th in README Generated bledata.pb.swift (protoc-gen-swift 1.36.1) uses the bytecode _NameMap initializer added in SwiftProtobuf 1.31.0; the previous '~> 1.0' / from: "1.0.0" constraints allowed incompatible versions. Co-authored-by: dballance <1234523+dballance@users.noreply.github.com>
tango-tango-mashbill
Bot
changed the base branch from
feat/session-restoration
to
master
November 2, 2026 21:03
dballance
marked this pull request as ready for review
November 2, 2026 21:19
Co-authored-by: dballance <1234523+dballance@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request updated by mashbill for dballance from a mashbill Session.
Brings the fork's
masterup to date. It mergesPhilipsHue/flutter_reactive_blemaster (e8b43fb) with ourfeat/session-restorationwork (5425f31), so thatreactive_ble_mobilesupports Swift Package Manager on iOS/macOS. All fork features are kept. After this lands,masterholds the latest upstream plus our changes. It also covers #1, whose 25 commits are included with unchanged SHAs.Upstream adds 15 commits since the fork point (
a6dd926, June 2024), including:Central.swiftCommits
e696ae2: the merge, with conflict resolutions.f0c8667: raises the minimum SwiftProtobuf to1.31.0inPackage.swiftand~> 1.31in the podspec, because the regenerated Swift needs it. Also fixes the protoc output path inprotos/README.md.Conflict resolutions
connected_device_operation.dart,reactive_ble.dart: kept the fork'sattachToCharacteristicSubscription/attachToSubscriptionand upstream'ssubscribeToCharacteristicAsync/subscribeAsync. Platform setup is nowisAndroid || isIOS || isMacOSand still passesrestorationKey.reactive_ble_mobile/android/build.gradle: took upstream (AGP 9.1, built-in Kotlin, SDK 37). The fork's only change there was an SDK bump.bledata.pb*.dart,bledata.pb.swift): regenerated from the mergedbledata.protowith protoc 34.1, protoc_plugin 25.0.0 and protoc-gen-swift 1.36.1. Compared with upstream's files, the only additions are the fork's messages.pubspec.lockfiles: regenerated withbuild_runnerandflutter pub get.example/android/*,AppDelegate.swift: took upstream; the fork only had version bumps there.Podfile.lock: deleted, as upstream did.project.pbxproj: the Pods references are removed. A brokenInfo-Debug.plistreference was replaced with upstream'sInfo.plist.iOS source move
ios/Classes/now lives indarwin/reactive_ble_mobile/Sources/reactive_ble_mobile/, including the fork-onlyBleData extras/RestoredPeripheral.swift.ios/is gone, and nothing referencesSwiftReactiveBlePluginany more.PluginController.swift,Central.swift,CentralManagerDelegate.swiftandReactiveBlePlugin.swiftis intact:willRestoreStaterestored_deviceandbond_updateevent channelsinitializewithInitializationRequestregistrar.messenger(), which doesn't compile on macOS. They now use the sharedmessenger.Verification
flutter analyzeis clean in all packages, andflutter testpasses: 4, 93, 61 and 1 tests.swiftc -parsepasses on all Swift files.builtInKotlin=false),:reactive_ble_mobile:compileDebugKotlinsucceeds.Needs a Mac / device check
Protobuf ~> 3.5andswift_version 4.2. Check these don't clash with the app's Pods.Info-Release.plistreference points to a missing file. This was already true before the merge.Future upstream updates
Run
git fetch upstream && git merge upstream/masteron a branch, then open a PR intomasterand merge it with a merge commit. Regenerate the generated files (protobuf, mocks, lock files) rather than resolving them by hand.