检查iOS中的蜂窝网络类型 [英] Checking cellular network type in iOS

查看:502
本文介绍了检查iOS中的蜂窝网络类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发iOS应用,并希望确定该设备具有哪种类型的蜂窝连接。



我对我的设备使用的蜂窝网络最感兴趣:2G或3G,或其他。



但是,Reachability.h仅提供wifi或3G的检查。



如何检查2G,3G等?

解决方案

2G / 3G无法通过 Reachability.h 或任何其他第三方库进行区分,因为iPhone仅向API提供网络类型信息(WWAN,WiFi,无网络)。 / p>

但是,如果您能够知道2G或3G网络的IP范围,则可以确定iPhone使用的网络速度/频率。


I am working on an iOS app, and want to determine which type of cellular connection the device has.

I'm most interested in the kind of cellular network my device is using: 2G or 3G, or other.

However, the Reachability.h only provides checking for wifi or 3G.

How can I check for 2G, 3G, etc?

解决方案

2G / 3G cannot be distinguished via Reachability.h or any other third party libraries, as iPhone only provides network type information ( WWAN , WiFi , no Network ) to API.

However, if you are able to know the IP range of 2G or 3G network, you can determine which network speed / frequency the iPhone is using.

这篇关于检查iOS中的蜂窝网络类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆