Closed fdc-dev closed 9 years ago
Hi,
There aren't any interfaces on iOS with the name wifi
or mobile
so not sure how you intended that code to work? They are generally called something like en0
for the WiFi connection and like pdp_ip0
for the mobile. This may have worked with Android as I believe they are named like that there?
You should be using the isReachable
and isWWAN
flags to determine your connection type.
if (Network.networkInfo.isReachable)
{
// Have a network connection
if (NetworkInfo.networkInfo.isWWAN)
{
// Mobile (WWAN) connection
}
else
{
// WiFi or other connection
}
}
else
{
// No network connection
}
Hi,
we trying that code right now and we give you a comeback on that!
Thank you sir!!
From: Michael Sent: Thursday, November 20, 2014 6:24 PM To: distriqt/airnativeextensions Cc: fdc-dev Subject: Re: [airnativeextensions] iOS 8 - NetworkInfo always return .active = false (#270)
Hi, There aren't any interfaces on iOS with the name wifi or mobile so not sure how you intended that code to work? They are generally called something like en0 for the WiFi connection and like pdp_ip0 for the mobile. This may have worked with Android as I believe they are named like that there?
You should be using the isReachable and isWWAN flags to determine your connection type.
if (Network.networkInfo.isReachable) { // Have a network connection if (NetworkInfo.networkInfo.isWWAN) { // Mobile (WWAN) connection } else { // WiFi or other connection } } else { // No network connection } — Reply to this email directly or view it on GitHub.
Its working, Apple have approbe our app, thank you!
Hi,
we have a problem to submit our app on Apple AppStore. Your Network info native extension always return false on iOS 8 for wifi and mobile. Can you check our code and give a feedback ? It is working on iOS 7 and Android but not on iOS 8.