Skip to content

[connectivity] iOS 13, add location authorization request to enable getWifiName and getWifiBSSID to return valid values #37804

@danwulff

Description

@danwulff

Problem

With the changes to iOS 13, CNCopyCurrentNetworkInfo will return invalid SSID and BSSID values. This leads to the connectivity plugin returning invalid values for the getWifiName() and getWifiBSSID() methods.

Use case

Apps that require valid SSID and BSSID values to be returned within iOS 13.

Proposal

Update the connectivity plugin iOS code to request one of the authorizations required to return valid SSID and BSSID values with: requestWhenInUseAuthorization() or requestAlwaysAuthorization()

More Info

The announcement email from apple:
image

The documentation for CNCopyCurrentNetworkInfo:https://developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo.

Info for requesting the "When In Use" Location authorization: https://developer.apple.com/documentation/corelocation/choosing_the_authorization_level_for_location_services/requesting_when-in-use_authorization?language=objc

Info for requesting the "Always" Location authorization: https://developer.apple.com/documentation/corelocation/choosing_the_authorization_level_for_location_services/requesting_always_authorization

Metadata

Metadata

Assignees

Labels

customer: crowdAffects or could affect many people, though not necessarily a specific customer.customer: productp: connectivityThe connectivity pluginpackageflutter/packages repository. See also p: labels.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions