如何在iPhone中以编程方式检测EDGE网络或坏网络? [英] How can I programmatically detect EDGE network or bad network in iPhone?

查看:73
本文介绍了如何在iPhone中以编程方式检测EDGE网络或坏网络?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要检测iPhone中的EDGE网络和坏网络。

I need to detect the EDGE network and bad network in the iPhone.

1)如何检测不良网络

2)是否有可能检测到 EDGE网络

2) Is it possible to detect EDGE network separetly ?

3)怎么能我得到了网络的力量?

3) How can I get the strength of the network ?

请对这些问题给出一些答案。在此先感谢。

Please give some answer about these questions. Thanks in advance.

推荐答案

在iOS7上,你可以!

On iOS7, you can!

http://www.objc.io/issue-5/iOS7-hidden- gems-and-workarounds.html

CTTelephonyNetworkInfo *telephonyInfo = [CTTelephonyNetworkInfo new];
NSLog(@"Current Radio Access Technology: %@", telephonyInfo.currentRadioAccessTechnology);
[NSNotificationCenter.defaultCenter addObserverForName:CTRadioAccessTechnologyDidChangeNotification 
                                                object:nil 
                                                 queue:nil 
                                            usingBlock:^(NSNotification *note) 
{
    NSLog(@"New Radio Access Technology: %@", telephonyInfo.currentRadioAccessTechnology);
}];

这篇关于如何在iPhone中以编程方式检测EDGE网络或坏网络?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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