tripflex / WifiWizard2

A Cordova plugin for managing Wifi networks (new version of WiFiWizard) - Latest is version 3+
https://www.npmjs.com/package/cordova-plugin-wifiwizard2
Apache License 2.0
122 stars 146 forks source link

Connect using SSID with prefix if on iOS >= 13 #98

Open saoron opened 4 years ago

saoron commented 4 years ago

Description of the Change

iOS 13 introduced a new way to connect with an SSID prefix, this will automatically use the prefix method if on iOS 13

digaus commented 4 years ago

This looks nice !!

This functionality would allow me to just pass the prefix of smartphone devices (which are the same) to the connect function and it will try to connect to a network with that prefix?

What happens if there are multiple networks with this prefix?

digaus commented 4 years ago

Your PR won't work. It will always return an error because the prefix SSID is not the SSID which you are connected to.

https://github.com/digaus/WifiWizard2/commit/b84507a05e648ce20c4df1038ee43aecdd3c71e6

Tested with my iot devices. Working as expected.

digaus commented 4 years ago

@saoran

You also need to modify (void)iOSConnectOpenNetwork:(CDVInvokedUrlCommand*)command

arsenal942 commented 4 years ago

@saoron I agree with @digaus - Let us know once fixed up

digaus commented 4 years ago

@arsenal942

Might als be better to use a second plugin call for it but migrate the connect without password into the connect call.

-> connect and connectPrefix

tripflex commented 3 years ago

@digaus would you mind submitting a PR with the fixes?