xcode iOS 5 如何获取网络信息?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9254640/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I obtain network information in iOS 5?
提问by Groppe
I would like to know what the simplest/best way for obtaining information about the current network connection (if any) programmatically in iOS. More specifically:
我想知道在 iOS 中以编程方式获取有关当前网络连接(如果有)的信息的最简单/最佳方法是什么。进一步来说:
- Network Connection Type (3G or Wireless)
- Network Operator
- SSID of network
- BSSID of access point
- Mac Address of device
- Current IP address
- 网络连接类型(3G 或无线)
- 网络运营商
- 网络的SSID
- 接入点的BSSID
- 设备的Mac地址
- 当前 IP 地址
采纳答案by Steve
Network Connection Type:How to check for an active Internet connection on iOS or OSX?
网络连接类型:如何在 iOS 或 OSX 上检查活动的互联网连接?
MAC Address:How can I programmatically get the MAC address of an iphone
MAC 地址:如何以编程方式获取 iphone 的 MAC 地址
IP Address:How do I query the iPhone's current IP address?
IP 地址:如何查询 iPhone 当前的 IP 地址?
I'm not sure apple gives you access to the other three things you listed.
我不确定苹果是否可以让您访问您列出的其他三项内容。