NEHotspotConfigurationErrorDomain Code = 8“内部错误”。 [英] NEHotspotConfigurationErrorDomain Code=8 "internal error."

查看:2934
本文介绍了NEHotspotConfigurationErrorDomain Code = 8“内部错误”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 iOS 11 iPhone 上使用 NEHotspotConfigurationManager 连接到特定的Wi-Fi点,然后断开连接来自它。

I'm using NEHotspotConfigurationManager with on iOS 11 iPhone to connect to specific Wi-Fi spot and then disconnect from it.

以下是代码:

if (@available(iOS 11.0, *)) {
            NEHotspotConfiguration *configuration = [[NEHotspotConfiguration
                                                      alloc] initWithSSID:self.specififcWiFiSSID passphrase:self.specififcWiFiPassword isWEP:NO];
            configuration.joinOnce = YES;
          [[NEHotspotConfigurationManager sharedManager] applyConfiguration:configuration completionHandler:^(NSError * _Nullable error) {
            NSLog(@"Error : %@",error.description);
          }];
        } else {
            [Router showOfflineMessage:message];
        }

我使用 applyConfiguration ,一切都很好,每一个时间我想应用WiFi配置,会出现提示用户连接特定网络的警报,但现在没有任何内容出现,我在completionHanlder中收到此错误:

I used applyConfiguration and everything was fine, every time I want to apply WiFi configuration, an alert appears that prompts a user to connect specific network, but nothing appears now and I receiving this error in completionHanlder:

NEHotspotConfigurationErrorDomain Code=8 "internal error."

我稍后在代码中使用删除配置,但它似乎不起作用:

I'm using remove configuration later in code, but it seems not work as well:

[[NEHotspotConfigurationManager sharedManager] removeConfigurationForSSID:self.specififcWiFiSSID];

问题是:发生了什么?为什么它停止提示我加入WiFi网络,这个错误意味着什么?

Question is: what happened? Why it stopped prompts me to join WiFi network, and also what does this error mean?

更新:这似乎是iOS本身的一个错误,重启设备可能有所帮助。目前更新后所有工作。

UPDATED : It seems it was a bug with iOS itself, restart device could help. Currently after updates all works.

推荐答案

目前,只有重新启动设备才能解决问题一段时间然后再次发生。

完整日志:
Domain = NEHotspotConfigurationErrorDomain Code = 8内部错误。 UserInfo = {NSLocalizedDescription =内部错误。}

我试过调用 NEHotspotConfigurationManager.shared.removeConfiguration(forSSID: ssid)每次调用之前:

I've tried calling NEHotspotConfigurationManager.shared.removeConfiguration(forSSID: ssid) each time before calling:

let hotspot = NEHotspotConfiguration(ssid: ssid, passphrase: pwd, isWEP: false)
hotspot.joinOnce = true
NEHotspotConfigurationManager.shared.apply(hotspot) { (error) in
    completionHandler?(error)
}

但问题仍然存在......

But the issue still happens...

这篇关于NEHotspotConfigurationErrorDomain Code = 8“内部错误”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆