-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(wifi_iot): iOS isConnected always true even connection is failed #371
fix(wifi_iot): iOS isConnected always true even connection is failed #371
Conversation
hey @daadu A friendly question. |
hey @mavyfaby A friendly question. |
…er 3.24 (flutternetwork#398) * fix:Update compileSdkVersion to fix Android release build with flutter 3.24 * wifi_iot(android): upgrade compleiSDKVersion to 34 * fix dart analyzer issues --------- Co-authored-by: Harsh Bhikadia <[email protected]>
I have same issue |
I know. If this PR is merged, the problem can be solved. But nobody review and merge this PR in this repo. I created this PR in February, and have waited 8 months. |
@JooYoo extremely sorry for being unresponsive. The changes looks good to go. I'll merge this currently, unfortunately I'm traveling with limited connectivity - will release this to pub.dev in a day or two |
for some reason the CI checks are not trigger in PRs - need to look into that before merging this. |
@JooYoo Can you sync the fork and branch once. I am unable to do it:
|
…oYoo/fork-flutter_wifi_flutter into fix/wifi-iot-ios-is-connected pr: resolve local branch and remote branch have diverged
Hi @daadu welcome back! I synced the branch. Now this PR contains 17 files changing. Let me know, if I need to do something to support this PR. |
Yes will go with the cleaner PR if the changes are identical |
BugReproduce:
final connectedSSID = await WiFiForIoTPlugin.getSSID()
should see the current connectedSSID.final isConnected = await WiFiForIoTPlugin.connect(wrongSSID);
-> iOS System dialog is showing to indicate the connection is failed -> expectingisConnected
is [false] but get [true]RootCause
private func connect(call: FlutterMethodCall, result: @escaping FlutterResult)
sSSID
, after unwrappingssid
) and returned as result by comparing itself ( originalresult(ssid == sSSID)
). In this case, once the device is already connected to a ssid, getSSID() works correctly, then getSSID() will return the connectedSSID, unwrapping connectedSSID, comparing itself as the result, it will be always true. It leads connect(targetSSID) returns true, even if the connection is actually failed.Solution
connectedSSID
result(sSSID == connectedSSID)