【问题标题】:Connecting to to wifi network in iOS 11 "Unable to join the network"在 iOS 11 中连接到 wifi 网络“无法加入网络”
【发布时间】:2019-02-22 23:59:52
【问题描述】:

我正在尝试连接到应用程序内的 wifi 网络。使用下面的代码:

let hotspotConfig = NEHotspotConfiguration(ssid: "testNetwork")
hotspotConfig.joinOnce = true
NEHotspotConfigurationManager.shared.apply(hotspotConfig) { (configurationError) in
    if configurationError != nil {
      print("error")
      print(configurationError!.localizedDescription)
    } else {
      print("success")
    }        
}

但当我无法加入网络时,我会收到 Alert 提示: "无法加入网络testNetwork"

我的问题是,如果我无法连接,有什么方法可以显示警报?

【问题讨论】:

  • 你找到解决办法了吗?

标签: ios swift networking


【解决方案1】:

我很确定您无法拦截和隐藏该消息,因为它是由操作系统处理的(与加入网络弹出窗口相同)。

【讨论】:

    猜你喜欢
    • 2015-05-20
    • 1970-01-01
    • 2021-09-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多