From cc74f140c28deb83846a277905633da9a5a739b6 Mon Sep 17 00:00:00 2001 From: Daniel Wulff Date: Wed, 7 Aug 2019 12:30:12 -0700 Subject: [PATCH 1/6] update the connectivity readme to include information about changes in iOS 13 --- packages/connectivity/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/packages/connectivity/README.md b/packages/connectivity/README.md index b1c2b8b356fe..6e8d9097176e 100644 --- a/packages/connectivity/README.md +++ b/packages/connectivity/README.md @@ -7,6 +7,8 @@ This plugin works for iOS and Android. > Note that on Android, this does not guarantee connection to Internet. For instance, the app might have wifi access but it might be a VPN or a hotel WiFi with no access. +## Usage + Sample usage to check current status: ```dart @@ -48,6 +50,31 @@ dispose() { } ``` +Additional methods available: + +```dart +@override +initState() { + super.initState(); + + await Connectivity().getWifiBSSID(); // obtains the BSSID of the connected wifi network + await Connectivity().getWifiIP(); // obtains the IP address of the connected wifi network + await Connectivity().getWifiName(); // obtains the wifi name (SSID) of the connected wifi network +} +``` + +### Known Issues + +#### iOS 13 + +The methods `.getWifiBSSID()` and `.getWifiName()` utilize the [CNCopyCurrentNetworkInfo](https://developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo) function on iOS. + +As of iOS 13 that api will no longer return valid information by default and will instead return the following: +> SSID: "Wi-Fi" or "WLAN" ("WLAN" will be returned for the China SKU) +> BSSID: "00:00:00:00:00:00" + +You can follow issue [#37804](https://github.com/flutter/flutter/issues/37804) for the changes required to return valid SSID and BSSID values with iOS 13. + ## Getting Started For help getting started with Flutter, view our online From 7278b06cdad1143a0cb735c109abc1c83a6a0e74 Mon Sep 17 00:00:00 2001 From: Daniel Wulff Date: Wed, 7 Aug 2019 15:50:58 -0700 Subject: [PATCH 2/6] PR comment --- packages/connectivity/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/connectivity/README.md b/packages/connectivity/README.md index 6e8d9097176e..db215ea52064 100644 --- a/packages/connectivity/README.md +++ b/packages/connectivity/README.md @@ -69,7 +69,7 @@ initState() { The methods `.getWifiBSSID()` and `.getWifiName()` utilize the [CNCopyCurrentNetworkInfo](https://developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo) function on iOS. -As of iOS 13 that api will no longer return valid information by default and will instead return the following: +As of iOS 13, these APIs will no longer return valid information by default and will instead return the following: > SSID: "Wi-Fi" or "WLAN" ("WLAN" will be returned for the China SKU) > BSSID: "00:00:00:00:00:00" From fbf65d79649aac1345fe064b84dfc004b3c55696 Mon Sep 17 00:00:00 2001 From: Daniel Wulff Date: Wed, 7 Aug 2019 15:52:24 -0700 Subject: [PATCH 3/6] increment version, and update changelog --- packages/connectivity/CHANGELOG.md | 4 ++++ packages/connectivity/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/connectivity/CHANGELOG.md b/packages/connectivity/CHANGELOG.md index 6bc9f4a24be6..a07f982113bc 100644 --- a/packages/connectivity/CHANGELOG.md +++ b/packages/connectivity/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.3+7 + +* Update README with iOS 13 known issue information + ## 0.4.3+6 * [Android] Fix the invalid suppression check (it should be "deprecation" not "deprecated"). diff --git a/packages/connectivity/pubspec.yaml b/packages/connectivity/pubspec.yaml index 33c8e4d94595..b91741f2f916 100644 --- a/packages/connectivity/pubspec.yaml +++ b/packages/connectivity/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for discovering the state of the network (WiFi & mobile/cellular) connectivity on Android and iOS. author: Flutter Team homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity -version: 0.4.3+6 +version: 0.4.3+7 flutter: plugin: From b9d342b37e4c983c1fe3beea5229ec491e1373b8 Mon Sep 17 00:00:00 2001 From: Daniel Wulff Date: Wed, 7 Aug 2019 15:56:48 -0700 Subject: [PATCH 4/6] update the Readme example to be more accurate --- packages/connectivity/README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/connectivity/README.md b/packages/connectivity/README.md index db215ea52064..271214c23ba7 100644 --- a/packages/connectivity/README.md +++ b/packages/connectivity/README.md @@ -53,14 +53,11 @@ dispose() { Additional methods available: ```dart -@override -initState() { - super.initState(); +import 'package:connectivity/connectivity.dart'; - await Connectivity().getWifiBSSID(); // obtains the BSSID of the connected wifi network - await Connectivity().getWifiIP(); // obtains the IP address of the connected wifi network - await Connectivity().getWifiName(); // obtains the wifi name (SSID) of the connected wifi network -} +var wifiBSSID = await (Connectivity().getWifiBSSID()); // obtains the BSSID of the connected wifi network +var wifiIP = await (Connectivity().getWifiIP()); // obtains the IP address of the connected wifi network +var wifiName = await (Connectivity().getWifiName()); // obtains the wifi name (SSID) of the connected wifi network ``` ### Known Issues From 83ae4a433970b6c0168f6a81aa03f9431c1f55b4 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 7 Aug 2019 16:13:48 -0700 Subject: [PATCH 5/6] Update CHANGELOG.md --- packages/connectivity/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/connectivity/CHANGELOG.md b/packages/connectivity/CHANGELOG.md index a07f982113bc..4115a1be4aae 100644 --- a/packages/connectivity/CHANGELOG.md +++ b/packages/connectivity/CHANGELOG.md @@ -1,6 +1,6 @@ ## 0.4.3+7 -* Update README with iOS 13 known issue information +* Update README with the updated information about CNCopyCurrentNetworkInfo on iOS 13. ## 0.4.3+6 From 6ba15e64068b29a89f884fd95ffe12ce7344c760 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 7 Aug 2019 16:19:21 -0700 Subject: [PATCH 6/6] Update README.md --- packages/connectivity/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/connectivity/README.md b/packages/connectivity/README.md index 271214c23ba7..215f8991a756 100644 --- a/packages/connectivity/README.md +++ b/packages/connectivity/README.md @@ -50,14 +50,14 @@ dispose() { } ``` -Additional methods available: +You can get WIFI related information using: ```dart import 'package:connectivity/connectivity.dart'; -var wifiBSSID = await (Connectivity().getWifiBSSID()); // obtains the BSSID of the connected wifi network -var wifiIP = await (Connectivity().getWifiIP()); // obtains the IP address of the connected wifi network -var wifiName = await (Connectivity().getWifiName()); // obtains the wifi name (SSID) of the connected wifi network +var wifiBSSID = await (Connectivity().getWifiBSSID()); +var wifiIP = await (Connectivity().getWifiIP());network +var wifiName = await (Connectivity().getWifiName());wifi network ``` ### Known Issues @@ -66,7 +66,7 @@ var wifiName = await (Connectivity().getWifiName()); // obtains the wifi name The methods `.getWifiBSSID()` and `.getWifiName()` utilize the [CNCopyCurrentNetworkInfo](https://developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo) function on iOS. -As of iOS 13, these APIs will no longer return valid information by default and will instead return the following: +As of iOS 13, Apple announced that these APIs will no longer return valid information by default and will instead return the following: > SSID: "Wi-Fi" or "WLAN" ("WLAN" will be returned for the China SKU) > BSSID: "00:00:00:00:00:00"