diff --git a/packages/connectivity/CHANGELOG.md b/packages/connectivity/CHANGELOG.md index 6bc9f4a24be6..4115a1be4aae 100644 --- a/packages/connectivity/CHANGELOG.md +++ b/packages/connectivity/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.3+7 + +* Update README with the updated information about CNCopyCurrentNetworkInfo on iOS 13. + ## 0.4.3+6 * [Android] Fix the invalid suppression check (it should be "deprecation" not "deprecated"). diff --git a/packages/connectivity/README.md b/packages/connectivity/README.md index b1c2b8b356fe..215f8991a756 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,28 @@ dispose() { } ``` +You can get WIFI related information using: + +```dart +import 'package:connectivity/connectivity.dart'; + +var wifiBSSID = await (Connectivity().getWifiBSSID()); +var wifiIP = await (Connectivity().getWifiIP());network +var wifiName = await (Connectivity().getWifiName());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, 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" + +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 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: