简体   繁体   English

在我的iPhone应用程序中使用wifi

[英]Work with wifi in my iphone application

请回答我,如何在我的iPhone应用程序中获取有关wifi网络的信息,苹果是否为此提供了API,是否可以在不退出我的应用程序的情况下更改当前的wifi连接?

There is no API for listing available wifi networks or programmatically changing to a different one. 没有API可以列出可用的wifi网络或以编程方式更改为其他网络。 The closest way you might be able to get a list would be to use an NSNetServiceBrowser and try to discover all tcp services. 可能能够获取列表的最接近方法是使用NSNetServiceBrowser并尝试发现所有tcp服务。 I doubt that'll work, but it might be worth a shot. 我怀疑这样做是否有效,但是可能值得一试。

I was curious about this as well. 我对此也很好奇。 The posts below explain things in more detail. 下面的帖子更详细地说明了事情。 There are undocumented ways of getting WiFi information, but it'll get your app rejected on the iTunes Store. 有未记录的获取WiFi信息的方法,但是它将使您的应用在iTunes Store上被拒绝。

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

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