You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2012/10/09 17:16:03 UTC

[jira] [Created] (CB-1604) natigator.connection not implemented correctly on iOS

Andrew Grieve created CB-1604:
---------------------------------

             Summary: natigator.connection not implemented correctly on iOS
                 Key: CB-1604
                 URL: https://issues.apache.org/jira/browse/CB-1604
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
    Affects Versions: Master
            Reporter: Andrew Grieve
            Assignee: Andrew Grieve
             Fix For: 2.2.0


I broke this when changing Android from using navigator.network.connection -> navigator.connection. iOS currently sets navigator.network.connection and fires online/offline events directly instead of returning multiple getConnectionInfo() callbacks like Android does. 

The fix here is to change CDVConnection.m to act the same as Android, and just return a new getConnectionInfo PluginResult when the connection changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1604) natigator.connection not implemented correctly on iOS

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472515#comment-13472515 ] 

Andrew Grieve commented on CB-1604:
-----------------------------------

Sorry for the poor description. This is not related to exec bridge changes.

I don't want to change the API. The shared connection.js file is already set up to fire online/offline events based on changes to connection.type:
https://github.com/apache/incubator-cordova-js/blob/master/lib/common/plugin/network.js

iOS is not using this code, except for on start-up. Instead, it is firing online/offline events from the native side, and directly setting navigator.network.connection.type instead of using a PluginResult so that the JS can set navigator.connection.type. The bug is that I deprecated navigator.network.connection in favour of navigator.connection, but iOS's native side is hard-coded to set navigator.network.connection.type.
                
> natigator.connection not implemented correctly on iOS
> -----------------------------------------------------
>
>                 Key: CB-1604
>                 URL: https://issues.apache.org/jira/browse/CB-1604
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Andrew Grieve
>            Assignee: Andrew Grieve
>             Fix For: 2.2.0
>
>
> I broke this when changing Android from using navigator.network.connection -> navigator.connection. iOS currently sets navigator.network.connection and fires online/offline events directly instead of returning multiple getConnectionInfo() callbacks like Android does. 
> The fix here is to change CDVConnection.m to act the same as Android, and just return a new getConnectionInfo PluginResult when the connection changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1604) natigator.connection not implemented correctly on iOS

Posted by "Michal Mocny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472510#comment-13472510 ] 

Michal Mocny commented on CB-1604:
----------------------------------

Becky, I think this was just a change to improve the exec bridge, not changing any api or user behaviour.  Andrew can confirm..
                
> natigator.connection not implemented correctly on iOS
> -----------------------------------------------------
>
>                 Key: CB-1604
>                 URL: https://issues.apache.org/jira/browse/CB-1604
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Andrew Grieve
>            Assignee: Andrew Grieve
>             Fix For: 2.2.0
>
>
> I broke this when changing Android from using navigator.network.connection -> navigator.connection. iOS currently sets navigator.network.connection and fires online/offline events directly instead of returning multiple getConnectionInfo() callbacks like Android does. 
> The fix here is to change CDVConnection.m to act the same as Android, and just return a new getConnectionInfo PluginResult when the connection changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1604) navigator.connection not implemented correctly on iOS

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-1604:
---------------------------------

    Summary: navigator.connection not implemented correctly on iOS  (was: natigator.connection not implemented correctly on iOS)
    
> navigator.connection not implemented correctly on iOS
> -----------------------------------------------------
>
>                 Key: CB-1604
>                 URL: https://issues.apache.org/jira/browse/CB-1604
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Andrew Grieve
>            Assignee: Andrew Grieve
>             Fix For: 2.2.0
>
>
> I broke this when changing Android from using navigator.network.connection -> navigator.connection. iOS currently sets navigator.network.connection and fires online/offline events directly instead of returning multiple getConnectionInfo() callbacks like Android does. 
> The fix here is to change CDVConnection.m to act the same as Android, and just return a new getConnectionInfo PluginResult when the connection changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CB-1604) natigator.connection not implemented correctly on iOS

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve resolved CB-1604.
-------------------------------

    Resolution: Fixed

https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-ios.git;a=commit;h=ffdc81be5a9e462aa909ccd416427a4e2578a8ef
                
> natigator.connection not implemented correctly on iOS
> -----------------------------------------------------
>
>                 Key: CB-1604
>                 URL: https://issues.apache.org/jira/browse/CB-1604
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Andrew Grieve
>            Assignee: Andrew Grieve
>             Fix For: 2.2.0
>
>
> I broke this when changing Android from using navigator.network.connection -> navigator.connection. iOS currently sets navigator.network.connection and fires online/offline events directly instead of returning multiple getConnectionInfo() callbacks like Android does. 
> The fix here is to change CDVConnection.m to act the same as Android, and just return a new getConnectionInfo PluginResult when the connection changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1604) natigator.connection not implemented correctly on iOS

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472484#comment-13472484 ] 

Becky Gibson commented on CB-1604:
----------------------------------

Are you suggesting removing the events?  These are part of the event documentation?  Not knowing Android, I guess I am confused as to what the exact problem is - I'm worried about changing apis or behaviors user's are accustomed to?
                
> natigator.connection not implemented correctly on iOS
> -----------------------------------------------------
>
>                 Key: CB-1604
>                 URL: https://issues.apache.org/jira/browse/CB-1604
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Andrew Grieve
>            Assignee: Andrew Grieve
>             Fix For: 2.2.0
>
>
> I broke this when changing Android from using navigator.network.connection -> navigator.connection. iOS currently sets navigator.network.connection and fires online/offline events directly instead of returning multiple getConnectionInfo() callbacks like Android does. 
> The fix here is to change CDVConnection.m to act the same as Android, and just return a new getConnectionInfo PluginResult when the connection changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira