cordova-plugin-network-information icon indicating copy to clipboard operation
cordova-plugin-network-information copied to clipboard

network.connection.type is always unkown on iOS 13.2.2

Open manjunathgudisi opened this issue 5 years ago • 8 comments

Bug Report

Problem

network.connection.type is always unkown though I had connected to wifi and mobile data connection.

What is expected to happen?

network.connection.type = "WIFI"

What does actually happen?

network.connection.type = "unkonwn"

Information

I followed this documentation: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-network-information/index.html

Environment, Platform, Device

iPhone XR running on iOS 13.2.2

Version information

Cordova version: 9.0.0 ([email protected]) node version: v12.8.1 npm version: 6.13.0

ordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport" cordova-plugin-barcodescanner 0.7.4 "BarcodeScanner" cordova-plugin-battery-status 2.0.3 "Battery" cordova-plugin-camera 4.1.0 "Camera" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-device 2.0.3 "Device" cordova-plugin-dialogs 2.0.2 "Notification" cordova-plugin-file 6.0.2 "File" cordova-plugin-file-transfer 1.7.1 "File Transfer" cordova-plugin-geolocation 4.0.2 "Geolocation" cordova-plugin-media-capture 3.0.3 "Capture" cordova-plugin-network-information 2.0.2 "Network Information" cordova-plugin-splashscreen 5.0.3 "Splashscreen" cordova-plugin-vibration 3.1.1 "Vibration" cordova-plugin-whitelist 1.3.3 "Whitelist"

Checklist

  • [X] I searched for existing GitHub issues
  • [X] I updated all Cordova tooling to most recent version
  • [X] I included all the necessary information above

manjunathgudisi avatar Nov 17 '19 04:11 manjunathgudisi

Screen Shot 2019-11-17 at 10 47 50 AM

This is how it looks like when I debug the app.

manjunathgudisi avatar Nov 17 '19 05:11 manjunathgudisi

same situation here :(

mkurzweil avatar Dec 05 '19 09:12 mkurzweil

Just came across this as well

Ross-Rawlins avatar Dec 06 '19 15:12 Ross-Rawlins

Is anyone of you Apple to test the iOS 13.3 Beta? Does the issue still persist? Also, is, e.g., iOS 13.2 or lower affected, too?

I could imagine that Apple changed the API - or broke it (temporarily).

timbru31 avatar Dec 06 '19 18:12 timbru31

I noticed this behaviour

  • Open xcode

  • Run the app on your device

  • it says connection type unknown

  • just close the app, that means app is still running in the background

  • again open the app on device

  • now connection type is WiFi (if your device is connected to WiFi)

manjunathgudisi avatar Dec 07 '19 06:12 manjunathgudisi

My Connection type only returns for WIFI, all the others come back as none

Ross-Rawlins avatar Dec 09 '19 07:12 Ross-Rawlins

I noticed this post: https://programmer.help/blogs/new-features-of-cncopycurrent-network-info-in-ios-13.html IMO apple changed the behaviour to protect user privacy.

It seems only some apps can obtain more information of the network. image

I think the plugin uses an older api (the Objective C Reachablity - api) than mentioned in the post, but the rules will probably remain the same.

PieterVanPoyer avatar Jan 10 '20 21:01 PieterVanPoyer

Running in iOS simulator, the navigator.connection.type starts off with value wifi. If I turn off the host wifi, then the type becomes none as expected. But when I turn wifi back on, the type still remains none forever. It never updates back to wifi.

jacobg avatar Feb 13 '20 20:02 jacobg