WiFiFlutter icon indicating copy to clipboard operation
WiFiFlutter copied to clipboard

[wifi_iot] WiFiForIoTPlugin.connect() always returns true (IOS 16?)

Open AbdullahGheith opened this issue 2 years ago • 3 comments

On IOS 16 (I havent tried previous versions), .connect returns true for a network that doesnt even exist. I get the ios dialog saying "Can't connect to network". But i cant detect in my code wether i've connected to the network or not. .catchError() doesnt get triggered either. Any workarounds until this gets fixed?

AbdullahGheith avatar Mar 15 '23 13:03 AbdullahGheith

In iOS 14 or later and iPadOS 14 or later, any app that wants to interact with devices on your network must need a local network permission on you application

Gobink6 avatar Mar 15 '23 14:03 Gobink6

I have all the necessary permissions. It works on android and ios works when the AP exists. But when the app doesnt exist, i still get true.

Current workaround is after .connect is finished, for ios, i check the current connected SSID to see if it matches my expected ssid

AbdullahGheith avatar Mar 15 '23 14:03 AbdullahGheith

Same here (iPad OS 17). I also check the SSID and if the IP address changed.

BenelliFurtado avatar Jun 18 '24 13:06 BenelliFurtado