[ 
https://issues.apache.org/jira/browse/CB-10733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15173459#comment-15173459
 ] 

Laurent Zubiaur commented on CB-10733:
--------------------------------------

Hi, the network plugin uses "exec" to call "NetworkStatus.getConnectionInfo" 
which of course is not implemented on the OSX platform. The problem is that the 
exec function doesn't to call the error callback which is required to fire 
"deviceready". 

/// The plugin waits for onCordovaConnectionReady
   channel.waitForInitialization('onCordovaConnectionReady');

/// Here it calls the plugin native getConnectionInfo
   NetworkConnection.prototype.getInfo = function(successCallback, 
errorCallback) {
       exec(successCallback, errorCallback, "NetworkStatus", 
"getConnectionInfo", []);
   };

/// On error the plugin fire onCordovaConnectionReady so deviceready is still 
called
   function (e) {
        // If we can't get the network info we should still tell Cordova
        // to fire the deviceready event.
        if (channel.onCordovaConnectionReady.state !== 2) {
            channel.onCordovaConnectionReady.fire();
        console.log("Error initializing Network Connection: " + e);
  }


> deviceready not fired - OSX
> ---------------------------
>
>                 Key: CB-10733
>                 URL: https://issues.apache.org/jira/browse/CB-10733
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: OSX
>    Affects Versions: 6.0.0
>         Environment: Darwin 10.11.2, Xcode 7.2.1, 
> cordova-plugin-network-information 1.2.0, platform osx 4.0.0
>            Reporter: Laurent Zubiaur
>            Assignee: Tobias Bocanegra
>              Labels: triaged
>
> Hi, deviceready is not fired on platform osx (4.0.0) when network plugin is 
> installed (1.2.0). 
> Console:
> [Log] deviceready has not fired after 5 seconds. (cordova.js, line 974)
> [Log] Channel not fired: onCordovaConnectionReady (cordova.js, line 967)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to