Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Changes from 1 commit
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
27 changes: 27 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,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:
Comment thread
danwulff marked this conversation as resolved.
Outdated
> 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.
Comment thread
danwulff marked this conversation as resolved.

## Getting Started

For help getting started with Flutter, view our online
Expand Down