flutternetwork / WiFiFlutter

Flutter plugin suite for various WiFi services.
https://wifi.flutternetwork.dev
286 stars 178 forks source link

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

Open FelderCamille opened 1 year ago

FelderCamille commented 1 year ago

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.

Jay-57blocks commented 11 months ago

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

FelderCamille commented 11 months ago

@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!

Jay-57blocks commented 11 months ago

@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

daadu commented 9 months ago

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.

selcuksenel commented 5 months ago

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.