title: A way to calculate or get wifi strength on Swift on iOS 11
body: <p>Looking for a way to either get or calculate the wifi strength of a device? Have seen examples of scraping the status bar but cannot get it to work on iOS 11:</p>
  
  <pre><code>func getSignalStrength() -&gt; Int {
      let application = UIApplication.shared
      let statusBarView = application.value(forKey: "statusBar") as! UIView
      let foregroundView = statusBarView.value(forKey: "foregroundView") as! UIView
      let foregroundViewSubviews = foregroundView.subviews
  
      var dataNetworkItemView:UIView!
  
      for subview in foregroundViewSubviews {
          if subview.isKind(of: NSClassFromString("UIStatusBarSignalStrengthItemView")!) {
              dataNetworkItemView = subview
              print("NONE")
              break
          } else {
              print("NONE")
  
              return 0 //NO SERVICE
          }
      }
  
      return dataNetworkItemView.value(forKey: "signalStrengthBars") as! Int
  }
  </code></pre>
  
  <p>Any clever ideas? </p>
  
  <p>Does not need to be approved by apple</p>