diff --git a/packages/reactive_ble_mobile/ios/Classes/Plugin/PluginController.swift b/packages/reactive_ble_mobile/ios/Classes/Plugin/PluginController.swift index ca8d2707..c5dbfecf 100644 --- a/packages/reactive_ble_mobile/ios/Classes/Plugin/PluginController.swift +++ b/packages/reactive_ble_mobile/ios/Classes/Plugin/PluginController.swift @@ -73,7 +73,7 @@ final class PluginController { message = DeviceInfo.with { $0.id = peripheral.identifier.uuidString // Restored device state is different from peripheral state from connection manager - $0.connectionState = encode(.connected) + $0.connectionState = 4 } case .failedToConnect(let underlyingError), .disconnected(let underlyingError): diff --git a/packages/reactive_ble_platform_interface/lib/src/model/connection_state_update.dart b/packages/reactive_ble_platform_interface/lib/src/model/connection_state_update.dart index 6ee0ca65..13bcf827 100644 --- a/packages/reactive_ble_platform_interface/lib/src/model/connection_state_update.dart +++ b/packages/reactive_ble_platform_interface/lib/src/model/connection_state_update.dart @@ -35,7 +35,10 @@ enum DeviceConnectionState { disconnecting, /// Device is disconnected. - disconnected + disconnected, + + /// Device is restored (iOS only - when using state restoration) + restored } /// Type of connection error.