Skip to content
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

iOSDisconnectNetwork() does not actually disconnect at all #101

Open
3 of 7 tasks
zabojad opened this issue Feb 6, 2020 · 1 comment
Open
3 of 7 tasks

iOSDisconnectNetwork() does not actually disconnect at all #101

zabojad opened this issue Feb 6, 2020 · 1 comment

Comments

@zabojad
Copy link

zabojad commented Feb 6, 2020

Prerequisites

Check all boxes if you have done the following:

Issue type

Select all that apply

  • Bug
  • Enhancement
  • Task
  • Question
  • Other

Description

I'm testing this plugin on an iPhone SE with iOS 13.2.3. Here are my observations:

        WifiWizard2.getConnectedSSID()
            .then(
                function(v) {
                    console.log('GOT SSID: '+v);
                    if (v) {
                        console.log('disconnecting from: '+v);
                        WifiWizard2
                            .iOSDisconnectNetwork(v)
                            .then(
                                function(){
                                    setTimeout(app.refreshSSID,1000);
                                }
                            );
                    }
                    else {
                        let ssid = view.getSSIDInput();
                        console.log('connecting to: '+ssid);
                        WifiWizard2
                            .iOSConnectNetwork(ssid, false)
                            .then(
                                function(){
                                    setTimeout(app.refreshSSID,1000);
                                }
                            );
                    }
                }
            )
            .catch(
                function(e){
                    console.error(e);
                    alert("can't get current SSID: "+e.message);
                }
            );

=> WifiWizard2.iOSDisconnectNetwork(v) enters in its then block but it doesn't disconnect the device from the wifi hotspot.

Steps to Reproduce

  1. Use the code above and run it.

Expected behavior:

When entering the then blowk of the iOSDisconnectNetwork operation, the device should be disconnected from its wifi hotspot.

Actual behavior:

Nothing seems to happen when it should actually disconnect from the wifi.

Reproduces how often: 100% of the time

Versions

$ cordova -v
9.0.0 ([email protected])

$ cordova platform list
Installed platforms:
  ios 5.1.1
Available platforms: 
  android ^8.0.0
  browser ^6.0.0
  electron ^1.0.0
  osx ^5.0.0
  windows ^7.0.0

$ cordova plugin list
com.wizpanda.cordova.guided-access 0.0.1 "cordova-ios-guided-access"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-battery-status 2.0.5 "Battery"
cordova-plugin-brightness 0.1.5 "Brightness"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-device-name 1.3.5 "Device-Name"
cordova-plugin-exit 1.0.3 "Exit"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-wkwebview-engine 1.2.1 "Cordova WKWebView Engine"
es6-promise-plugin 4.1.0 "Promise"
phonegap-plugin-barcodescanner 8.1.0 "BarcodeScanner"
wifiwizard2 3.1.1 "WifiWizard2"

Additional Information

n/a

@zabojad
Copy link
Author

zabojad commented Feb 6, 2020

I think that it probably comes from the fact that I did not connect to that hotspot with the iOSConnectNetwork method...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant