【问题标题】:Reachability to a WIFI with swift language可使用 Swift 语言访问 WIFI
【发布时间】:2015-01-20 15:40:56
【问题描述】:

我正在尝试获取我连接的 WIFI 的名称。是否有可能在 Swift 代码中知道它而不桥接到 Objective-C?谢谢!

【问题讨论】:

    标签: ios swift connection wifi reachability


    【解决方案1】:
    CWInterface(interfaceName: nil).ssid()
    

    通过传递 'nil' 作为接口,你可以得到当前连接的 wifi。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-30
      • 2020-08-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-31
      相关资源
      最近更新 更多