Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network.connection.type is always unkown on iOS 13.2.2 #97

Open
3 tasks done
manjunathgudisi opened this issue Nov 17, 2019 · 8 comments
Open
3 tasks done

network.connection.type is always unkown on iOS 13.2.2 #97

manjunathgudisi opened this issue Nov 17, 2019 · 8 comments

Comments

@manjunathgudisi
Copy link

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

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@manjunathgudisi
Copy link
Author

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

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

@mkurzweil
Copy link

same situation here :(

@Ross-Rawlins
Copy link

Just came across this as well

@timbru31
Copy link
Member

timbru31 commented Dec 6, 2019

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

@manjunathgudisi
Copy link
Author

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)

@Ross-Rawlins
Copy link

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

@PieterVanPoyer
Copy link
Contributor

PieterVanPoyer commented Jan 10, 2020

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.

@jacobg
Copy link

jacobg commented Feb 13, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants