title: Flutter IOS reading wifi name using the connectivity or wifi plugin
body: <p>This question is similar <a href="https://stackoverflow.com/questions/52498906/how-to-get-the-wifi-namessid-of-the-currently-connected-wifi-in-flutter">this question</a>, but slightly different.</p>
  
  <p>I am trying to retrieve the name of my currently connected wifi network using the <a href="https://pub.dartlang.org/packages/connectivity" rel="nofollow noreferrer">Connectivity Plugin</a>.</p>
  
  <p><a href="https://stackoverflow.com/a/52506351/4876579">This answer</a> works perfectly fine in android, and while it sounds like it should work for iOS, I am getting an exception:</p>
  
  <pre><code>PlatformException(UNAVAILABLE, wifi name unavailable, null)
  </code></pre>
  
  <p>Simple ex. of the code causing the exception (with the assumption I am connected to wifi, also not using an emulator):</p>
  
  <pre><code>Connectivity connectivity = Connectivity();
  print(await (connectivity.getWifiName()));
  </code></pre>
  
  <p>My gut is telling me it may be permission related, but honestly I am not sure.</p>
  
  <p>Cheers and thanks!</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I just realized, the exception above is thrown by the <a href="https://pub.dartlang.org/packages/wifi" rel="nofollow noreferrer">wifi plugin</a>, which I was also experimenting with.</p>
  
  <pre><code>print(await (Wifi.ssid));
  </code></pre>
  
  <p>Connectivity simply returns null...</p>