Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 9045614

Browse files
danwulffChris Yang
authored andcommitted
[connectivity] update the connectivity readme to include info about changes in iOS 13 (#1957)
1 parent d515868 commit 9045614

3 files changed

Lines changed: 29 additions & 1 deletion

File tree

packages/connectivity/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.3+7
2+
3+
* Update README with the updated information about CNCopyCurrentNetworkInfo on iOS 13.
4+
15
## 0.4.3+6
26

37
* [Android] Fix the invalid suppression check (it should be "deprecation" not "deprecated").

packages/connectivity/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This plugin works for iOS and Android.
77
> Note that on Android, this does not guarantee connection to Internet. For instance,
88
the app might have wifi access but it might be a VPN or a hotel WiFi with no access.
99

10+
## Usage
11+
1012
Sample usage to check current status:
1113

1214
```dart
@@ -48,6 +50,28 @@ dispose() {
4850
}
4951
```
5052

53+
You can get WIFI related information using:
54+
55+
```dart
56+
import 'package:connectivity/connectivity.dart';
57+
58+
var wifiBSSID = await (Connectivity().getWifiBSSID());
59+
var wifiIP = await (Connectivity().getWifiIP());network
60+
var wifiName = await (Connectivity().getWifiName());wifi network
61+
```
62+
63+
### Known Issues
64+
65+
#### iOS 13
66+
67+
The methods `.getWifiBSSID()` and `.getWifiName()` utilize the [CNCopyCurrentNetworkInfo](https://developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo) function on iOS.
68+
69+
As of iOS 13, Apple announced that these APIs will no longer return valid information by default and will instead return the following:
70+
> SSID: "Wi-Fi" or "WLAN" ("WLAN" will be returned for the China SKU)
71+
> BSSID: "00:00:00:00:00:00"
72+
73+
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.
74+
5175
## Getting Started
5276

5377
For help getting started with Flutter, view our online

packages/connectivity/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for discovering the state of the network (WiFi &
33
mobile/cellular) connectivity on Android and iOS.
44
author: Flutter Team <flutter-dev@googlegroups.com>
55
homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity
6-
version: 0.4.3+6
6+
version: 0.4.3+7
77

88
flutter:
99
plugin:

0 commit comments

Comments
 (0)