NEHotspotConfigurationManager
全部标签 我正在尝试让我的移动应用程序连接到Wifi网络(用于配置目的)。从iOS11开始,这应该可以通过NEHotspotConfiguration和NEHotspotConfigurationManager类实现。问题是我不断收到内部错误(错误代码8)并且没有收到用户提示以请求连接到wifi网络的权限。我已经在Xcode中设置了NEHotspotConfigurationManager类所需的热点配置功能。另外值得一提的是,我仅在真实设备上对此进行测试,因为iOS模拟器不支持wifi。虽然我使用的是NativeScript框架,但似乎这更多是底层iOS平台的问题。到目前为止我有这段代码:th
我正在尝试在安装了iOS11的设备中创建/添加热点配置。我的代码如下lethotspotConfig=NEHotspotConfiguration(ssid:"testNetwork")hotspotConfig.joinOnce=trueNEHotspotConfigurationManager.shared.apply(hotspotConfig){(configurationError)inifconfigurationError!=nil{print("error")print(configurationError!.localizedDescription)}else{pri
所以我正在尝试通过closers监视连接状态:funcreconnect(success:@escaping()->Void,failure:@escaping()->Void){letmanager=NEHotspotConfigurationManager.sharedletssid=CameraManager.camera.uuidletpassword="password"letisWEP=falselethotspotConfiguration=NEHotspotConfiguration(ssid:ssid,passphrase:password,isWEP:isWEP)h