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

[jira] [Updated] (CB-1738) PhoneGap iOS 6 - network.connection.type issue when turning OFF airplane mode

     [ https://issues.apache.org/jira/browse/CB-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jasper updated CB-1738:
-----------------------

    Summary: PhoneGap iOS 6 -  network.connection.type issue when turning OFF airplane mode  (was: PhoneGap iOS 6 -  network.connection.type issue during turning OFF airplane mode)
    
> PhoneGap iOS 6 -  network.connection.type issue when turning OFF airplane mode
> ------------------------------------------------------------------------------
>
>                 Key: CB-1738
>                 URL: https://issues.apache.org/jira/browse/CB-1738
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.5.0, 2.0.0
>         Environment: i am testing on two iPhone4 one running OS5 ,and one on OS6
>            Reporter: Jasper
>            Assignee: Shazron Abdullah
>            Priority: Minor
>              Labels: ios, network.connection
>             Fix For: 2.2.0
>
>
> update on 26Oct, 2012
> After more investigation I think this probably is an iOS6 issue
> The PhoneGap API returns "wifi" when the wifi symbol actually shows up ( the radio status probably doesn't matter ) on banner
> My application will invoke an RPC , which will fail due to error "A server with specified hostname could not be found" Code= 1003
> So I think the problem is iOS6 lies about the status, It says wifi is ready while it is not entirely. From my observation error occurs within 15s after wifi symbol shows up. After 15s almost for sure there will be no network error. 
> This issue cannot be reproduced on iOS5. It could be a problem within a LAN environment too ( I am hitting a server within company domain )
> PhoneGap probably got tricked by the iOS network status too. Maybe there is something else PhoneGap can check, but not sure.
> Meanwhile I will lower the bug priority  and report an issue to Apple.
> ----------------------------------------------------------------------------------------------------------------
> 24Oct 2012
> I have an app that talks to a server. Before making an RPC I use the PG API to check for connectivity: http://docs.phonegap.com/en/2.1.0/cordova_connection_connection.md.html#Connection code snippet:
>     var networkState = navigator.network.connection.type
>     if (networkState == "none" || networkState == "unknown")
>     {
>         //DO NOT make connection 
>     }
> Scenario: ( i am testing on two iPhone4 , one running OS5 ,and one on OS6) 
> 1. Turn ON airplane mode from setting. wait until the radio and wifi are fully OFF 
> 2. Turn OFF airplane, quickly switch to my app and make an RPC, make sure on the top left of the banner the connectivity status is showing "searching..."
> 3. Expect to see networkState as "unknown" (iOS5 behavior). but it returns "wifi" (iOS6)
> another minor observation - on iOS6 it takes double time to turn off the airplane mode.
> iOS5 it takes like around 3 seconds to have the connectivity reestablished, before i finish the following actions: toggle the mode button, close the setting app. foreground my app, click on a button. 
> iOS6 it takes like 6 seconds, which makes the bug more easy to reproduce.
> -------------------------------------------------------------------------------------------------------------------------

--
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