Online event isn't firing on iOS. 

Environment:
    iOS iPhone 5 emulator. iOS version: 10.3.1 
    Also tried same thing on iOS iPhone 6s emulator with iOS 11.4 
    
    On physical iPhone 5 with iOS 11.4.1 everything seems to work. Does the 
plugin have problems in the emulator?   

    cordova platforms   iOS 4.5.5

Steps to repeat:
    cordova create test 
    cordova platforms add ios@latest
    Add this to index.js: 

```
onDeviceReady: function() {
        this.receivedEvent('deviceready');

        document.addEventListener("online", () => { 
                console.log("ONLINE")
        }, false);
        document.addEventListener("offline", () => { 
                console.log("OFFLINE")
        }, false);
    },
```

On the machine running the emulator turn off all network access. 
   >> At this point "OFFLINE" prints (good!)

Turn on network access on the computer running the emulator. Expect to see 
"ONLINE" but I see nothing.



[ Full content available at: 
https://github.com/apache/cordova-plugin-network-information/issues/72 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to