/ios_network_info

Flutter plugin for fetching current network info in iOS (WiFi SSID and BSSID)

Primary LanguageDartMIT LicenseMIT

ios_network_info

This is a Dart plugin package for accessing network information from Flutter. This is an iOS-only plugin.

Usage

import 'package:ios_network_info/ios_network_info.dart';

getNetworkInfo() async {
  bssid = await IosNetworkInfo.bssid;
  ssid = await IosNetworkInfo.ssid;
}

For a working example app, see the example directory

Limitations

This Flutter plugin relies on CNCopyCurrentNetworkInfo which on iOS 12 and later requires the com.apple.developer.networking.wifi-info entitlement.

(CNCopyCurrentNetworkInfo) To use this function in iOS 12 and later, enable the Access WiFi Information capability in Xcode. For more information, see Access WiFi Information Entitlement.

Requesting this entitlement successfully is only available if you joined the Apple Developers Program.

Add "Access WiFi Information" capability to your app (otherwise, you'll receive nulls).

Don't forget to enable "Access WiFi Information" capability

Note: "Access WiFi Information" capability is not the same as "Wireless Accessory Configuration".

Alternatives

  • connectivity plugin lets you get the WiFi SSID (wifiName). After my pull request is merged, you can also get the BSSID of the current WiFi network

GitHub

The source code is available on GitHub smaho-gmbh/ios_network_info.

This Flutter plugin is created by the SMAHO engineering team.