1

我必须将它们使用两个不同网络的 iphone 应用程序。更改每个应用程序的网络设置对用户不友好。我想做如下的事情,

当应用程序启动时,它会检查特定网络 (SSID) 的可用性并向用户弹出一条消息以允许连接。一旦用户单击“确定”,他们就会连接到该特定网络。

有人有类似的经历吗?如何使用 ObjectiveC 连接到给定的 SSID?

4

1 回答 1

0

我一直在阅读实现应用程序控制网络的解决方案,但如果不使用Apple80211私有 API,这似乎是不可能的。

我认为您能做的最好的事情就是使用CaptiveNetwork

有了这个,你可以为你的设备注册一个 SSID 的列表,它会抑制 web 表。

从文档:

By calling the CNSetSupportedSSIDs function, an application can register a list of wireless network SSIDs with Captive Network Support, thereby assuming responsibility for authenticating with those networks. Typically when a user joins a captive network, Captive Network Support provides a web sheet that allows the user to authenticate with the network. If an application has registered the SSID of the captive network, however, the web sheet is suppressed, and the user can complete authentication in the appropriate application.

于 2013-06-06T07:58:41.977 回答