cordova-plugin-network-information
cordova-plugin-network-information copied to clipboard
network.connection.type is always unkown on iOS 13.2.2
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
This is how it looks like when I debug the app.
same situation here :(
Just came across this as well
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).
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)
My Connection type only returns for WIFI, all the others come back as none
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.

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