You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jacques L. CHEREAU (JIRA)" <ji...@apache.org> on 2017/12/18 16:18:00 UTC

[jira] [Comment Edited] (CB-13675) cordova-plugin-network-information reports type === NONE when connected through 3G/4G on iOS 11

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

Jacques L. CHEREAU edited comment on CB-13675 at 12/18/17 4:17 PM:
-------------------------------------------------------------------

Same code works fine with iOS 10.3.3 on iPhone 5C, so I doubt the issue is with the code.

Nevertheless the test I use is:


{code:javascript}
if ((window.device && window.device.platform === 'browser' && !window.navigator.onLine) ||
                ('Connection' in window && window.navigator.connection.type === window.Connection.NONE)) {
   // query data from IndexedDB
} else {
   // query data from Restful API with $.ajax and cache relevant data in IndexedDB
}
{code}



was (Author: jlchereau):
Same code works fine with iOS 10.3.3 on iPhone 5C, so I doubt the issue is with the code.

Nevertheless the test I use is:

if ((window.device && window.device.platform === 'browser' && !window.navigator.onLine) ||
                ('Connection' in window && window.navigator.connection.type === window.Connection.NONE)) {
   // query data from IndexedDB
} else {
   // query data from Restful API with $.ajax and cache relevant data in IndexedDB
}

> cordova-plugin-network-information reports type === NONE when connected through 3G/4G on iOS 11
> -----------------------------------------------------------------------------------------------
>
>                 Key: CB-13675
>                 URL: https://issues.apache.org/jira/browse/CB-13675
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: AllPlugins
>    Affects Versions: cordova-ios@4.4.0, cordova-ios@4.3.1
>         Environment: iPhone SE
> iOS 11.2
> Vodafone UK + WiFi
> Phonegap Cli 6.5.0 and 7.0.1
> cordova-ios 4.3.1 and 4.4.0
> cordova-plugin-network-information 1.3.4
>            Reporter: Jacques L. CHEREAU
>
> When an iPhone (SE) with iOS 11.2 is disconnected from WIFI *+but connected to a CELL network+* (Vodafone UK) either;
> * by being out of reach of a WIFI network, or
> * by forgetting the WIFI network in iOS settings or
> * by disabling WIFI in the iOS control panel:
> then
> # A cordova/phonegap app reports navigator.connection.type === Connection.NONE instead of Connection.CELLxxx
> # Upon launching such cordova/phonegap app an offline event is triggered
>  
> This issue has also been reported by someone else in the ionic forums [https://forum.ionicframework.com/t/cordova-network-plugin-is-not-working-in-ios-version-11-but-was-working-in-version-10/111326].



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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