hoerresb / WifiWizard

A Cordova plugin for managing Wifi networks
Apache License 2.0
205 stars 178 forks source link

getScanResults not supported on iOS ? #104

Open SimonTod opened 7 years ago

SimonTod commented 7 years ago

Here is my code:

WifiWizard.startScan(function() {
    WifiWizard.getScanResults({}, function(s) {
        // some code
    }, function(e) {console.log("getScanResults error: "+e)});
}, function(e) {console.log("startScan error: "+e)})

This works fine on Android, but on iOS I am getting this message from the startScan error callback:

startScan error: Not supported

I am using the WifiWizard 0.2.11 version installed from the next command line:

cordova plugin add wifiwizard --save

this adds the following line in my config.xml file:

<plugin name="com.pylonproducts.wifiwizard" spec="~0.2.11" />

Is my way of doing it the problem or is this just not compatible at all with iOS devices ?

SimonTod commented 7 years ago

I am thinking that this might need some new line(s) in the -Info.plist file

a432511 commented 7 years ago

The readme says, "The only function availabe for iOS is getCurrentSSID."

theavijitsarkar commented 7 years ago

This was working before

knro commented 7 years ago

Is this repo still being maintained? I see 15 open PR and lots of issues and no words from the repo owner?

arsenal942 commented 7 years ago

This has never been available for iOS based devices. Apple do not let you utilise the inbuilt wifi functionality that WifiWizard taps into and the only thing they do let you see is what SSID you are currently connected to.

What I have done as a workaround is serve up an apple profile configuration which has the SSID and password I want to connect to in it. It baffles me that Apple let you do this with profile configurations but don't let you access the internal wifi....

arsenal942 commented 7 years ago

For those that are also interested, https://github.com/hoerresb/WifiWizard/commit/d8ce10a231340cb61a8acacf879223bd429ab4ce contains the change which breaks where the success callback is only called if the connection successfully occurred.