iPad 中的 wifi 问题
我正在开发一个教育相关的应用程序。当 WIFI 连接时,我的应用程序功能运行良好,否则就会崩溃。
- 在我的应用程序中,我使用 NSURLRequest 类与其工作连接到服务器。
- 如果wifi可用的话,下载也没有任何问题。 问题纠正:我必须知道我的应用程序设备是否与外部网络连接。
那么,我如何知道我的应用程序是否连接了wifi呢?
I am working on a educational related apps. My app functionality is working well when the WIFI is connected otherwise it is getting crashed.
- In my app I am connecting with the server using NSURLRequest class its working.
- the download also not having any problem if the wifi is available.
problem rectification: I have to know weather the my app device is connected with external network or not.
So, how can I know my app is connected with the wifi or not?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下链接包含源代码,其中包含如何检查可达性。这意味着 wifi 或任何网络已连接或未连接。
http://developer.apple.com/library/ios /#samplecode/Reachability/Introduction/Intro.html
The following link consists source code, in which it consists how to check the reachability. That means the wifi or any network is connected of not.
http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html
Apple 提供了名为“Reachability”的示例代码来检测网络何时可用。这将是一个很好的起点,尽管快速谷歌应该找到一些替代方案。
Apple provides sample code called "Reachability" to detect when the network is available. That would be a good starting point, though a quick Google should locate some alternatives.