WiFiFlutter icon indicating copy to clipboard operation
WiFiFlutter copied to clipboard

[wifi_scan] Improve documentation to indicate that iOS is not supported

Open FelderCamille opened this issue 2 years ago • 5 comments

In the README.md file and on pub.dev, it is indicated that iOS is supported. According on my current test and on the reading that I juste made on some issues, iOS is in fact NOT supported.

Please update the documentation of the package to avoid confusions.

FelderCamille avatar Aug 27 '23 21:08 FelderCamille

@FelderCamille I also found this problem, have you solved it?

Jay-57blocks avatar Oct 30 '23 02:10 Jay-57blocks

@FelderCamille I also found this problem, have you solved it?

Unfortunately, no. I didn't use this package for scanning with iOS devices. To do so, in my scanning method, I simply check if it is possible to scan using the method canGetScannedResult() like this:

Future<StreamSubscription?> listenWifiAccessPoints() async {
    final canScan = await WifiScan.instance.canGetScannedResults(askPermissions: true);
    switch(canScan) {
      case CanGetScannedResults.yes:
        // TODO: scan for devices here
       break;
      default: break;
    }
    return null;
  }

It is also possible to check if the device is a iOS with Platform.isIOS instead of using the canGetScannedResult() method.

I haven't found another library that allows scanning with iOS. If you find one, I'd like to know about it!

FelderCamille avatar Oct 30 '23 08:10 FelderCamille

@FelderCamille I also found this problem, have you solved it?

Unfortunately, no. I didn't use this package for scanning with iOS devices. To do so, in my scanning method, I simply check if it is possible to scan using the method canGetScannedResult() like this:

Future<StreamSubscription?> listenWifiAccessPoints() async {
    final canScan = await WifiScan.instance.canGetScannedResults(askPermissions: true);
    switch(canScan) {
      case CanGetScannedResults.yes:
        // TODO: scan for devices here
       break;
      default: break;
    }
    return null;
  }

It is also possible to check if the device is a iOS with Platform.isIOS instead of using the canGetScannedResult() method.

I haven't found another library that allows scanning with iOS. If you find one, I'd like to know about it!

This might be possible with NetworkExtension (available since iOS 8). But you need the com.apple.developer.networking.HotspotHelper-entitlement in you app to use these APIs. To get these entitlement, you have to contact Apple and describe, why you need it.

But according to the information I found, Apple believes that small companies using LOT devices do not need to scan WIFI, so it is more difficult to pass the review.

Currently, on iOS, you can only read the currently connected WIFI SSID, while Android can scan the nearby WIFI list. Do you agree with me? Or if you have more ideas, you can leave comment

https://stackoverflow.com/questions/40681984/ios-get-list-of-all-wifi-networks/40683210#40683210

Jay-57blocks avatar Oct 31 '23 01:10 Jay-57blocks

Seems, like this is confusing to a lot of users.

Seems, like we need to remove the "check mark" in the readme, and give an explanation why pub.dev shows the "ios" tag.

Feel free to file PR for this.

daadu avatar Jan 05 '24 05:01 daadu

This plugin also took up my time due to misinformation in the readme. Why don't you fix this? I wanted to get a list of surrounding wifi networks. But I saw that this is not possible on iOS. There is no iOS support, this is a misconception.

selcuksenel avatar May 10 '24 18:05 selcuksenel