Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/connectivity/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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").
Expand Down
24 changes: 24 additions & 0 deletions packages/connectivity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity
version: 0.4.3+6
version: 0.4.3+7

flutter:
plugin:
Expand Down