Skip to content

Commit

Permalink
assume connecting state on iOS
Browse files Browse the repository at this point in the history
same behavior as Android
  • Loading branch information
remonh87 authored and werediver committed Jul 29, 2021
1 parent bc03041 commit ea29bd2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ios/Classes/Plugin/PluginController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,17 @@ final class PluginController {
let timeout = args.timeoutInMs > 0 ? TimeInterval(args.timeoutInMs) / 1000 : nil

completion(.success(nil))


if let sink = connectedDeviceSink {
let message = DeviceInfo.with {
$0.id = args.deviceID
$0.connectionState = encode(.connecting)
}
sink.add(.success(message))
} else {
print("Warning! No event channel set up to report a connection update")
}

do {
try central.connect(
to: deviceID,
Expand Down

0 comments on commit ea29bd2

Please sign in to comment.