You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/09/20 15:51:24 UTC

[GitHub] danfleck opened a new issue #72: Online not firing on iOS

danfleck opened a new issue #72: Online not firing on iOS
URL: https://github.com/apache/cordova-plugin-network-information/issues/72
 
 
   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.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org