Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Null SSID & BSSID For IOS #390

Open
akhilgorantala opened this issue May 15, 2024 · 3 comments
Open

Getting Null SSID & BSSID For IOS #390

akhilgorantala opened this issue May 15, 2024 · 3 comments

Comments

@akhilgorantala
Copy link

Can anyone help me how to properly setup the ios part. I have tried all things but its still giving me null value for ios.

@days155
Copy link

days155 commented Jun 3, 2024

same issue

@seddikmomo
Copy link

It is happening for both Android & IOS
for Androidthis is the peace of code that is cosing the issue

  private void getBSSID(Result poResult) {
    WifiInfo info = moWiFi.getConnectionInfo();

    String bssid = info.getBSSID();

    try {
      poResult.success(bssid.toUpperCase());
    } catch (Exception e) {
      poResult.error("Exception", e.getMessage(), null);
    }
  }```

@francesco98
Copy link

francesco98 commented Sep 24, 2024

I was encountering the same issue, and after some investigation, I realized that the problem was related to missing location permissions. To resolve this, I used the permission_handler plugin to request the necessary permissions.

Here’s the code that worked for me:

Permission.locationWhenInUse.request().then((status) {
  if (status.isGranted) {
    WiFiForIoTPlugin.getSSID().then((value) => print(value));
  } else {
    print("Location permission not granted");
  }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants