简体   繁体   English

NEHotspotHelper NetworkExtension

[英]NEHotspotHelper NetworkExtension

I am trying to use the new framework but I can not understand very well the scope. 我正在尝试使用新框架,但我无法理解范围。

Is it possible to connect a Wi Fi automatically? 是否可以自动连接Wi Fi For example, when iOS call the background service in my App I can set the password and the confidence of a particular network. 例如,当iOS在我的应用程序中调用后台服务时,我可以设置密码和特定网络的置信度。

[network setConfidence:kNEHotspotHelperConfidenceHigh];

[network setPassword:@"QWERTY"];

and I can see a message under the SSID but the user has to touch the Wi Fi to connect. 我可以在SSID下看到一条消息,但用户必须触摸Wi Fi进行连接。

My question is, is It possible to do this without the user touch it? 我的问题是,是否可以在没有用户触摸的情况下执行此操作? For example, When you have a known Wi Fi the iOS is connected to this automatically. 例如,当您拥有已知的Wi FiiOS会自动连接到此。

is There a way to emulate this behavior with this framework? 有没有办法用这个框架模拟这种行为?

Thanks. 谢谢。

This framework only allows you to connect selecting the network (touching it). 此框架仅允许您连接选择网络(触摸它)。 You can´t emulate this behavior because you can´t get into settings app, it´s the extension that get into your app and do the work 你无法模仿这种行为,因为你无法进入设置应用程序,它是进入你的应用程序并完成工作的扩展

If the user has already previously connected to an SSID that you are managing through NEHotspotHelper, you can automatically connect them. 如果用户之前已经连接到您通过NEHotspotHelper管理的SSID,则可以自动连接它们。 If the user has never connected to the SSID in the past, or has chosen to "Forget the Network", then know you can't automatically connect them without the user manually selecting the network from the settings app. 如果用户过去从未连接过SSID,或已选择“忘记网络”,则表示如果用户没有从设置应用程序手动选择网络,则无法自动连接它们。

Like Fernando Garcia Corrochano said there is no way to emulate this behavior. 就像Fernando Garcia一样,Corrochano说没有办法模仿这种行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM