首页 > 其他 > 详细

iPhone判断运营商

时间:2014-08-11 00:09:31      阅读:420      评论:0      收藏:0      [点我收藏+]
- (NSString *)getCarrier  
{  
    NSString *strCarrier = nil;  
    CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];  
    CTCarrier *carrier = [networkInfo subscriberCellularProvider];  
    if (carrier == nil)  
    {  
        [networkInfo release];  
        return strCarrier;  
    }  
      
    NSString *code = [carrier mobileNetworkCode];  
    if (code == nil)  
    {  
        [networkInfo release];  
        return strCarrier;  
    }  
      
    // 根据mobileNetworkCode判断运营商  
    if ([code isEqualToString:@"00"] || [code isEqualToString:@"02"] || [code isEqualToString:@"07"])  
        strCarrier = @"中国移动";  
    else if ([code isEqualToString:@"01"] || [code isEqualToString:@"06"])  
        strCarrier = @"中国联通";  
    else if ([code isEqualToString:@"03"] || [code isEqualToString:@"05"])  
        strCarrier = @"中国电信";  
    else if ([code isEqualToString:@"20"])  
        strCarrier = @"中国铁通";  
    else  
        strCarrier = nil;  
      
    [networkInfo release];  
      
    return strCarrier;  
}  

China - CN

MCCMNCBrandOperatorStatusBands (MHz)References and notes
460 00 China Mobile China Mobile Operational GSM 900 / GSM 1800 / TD-SCDMA 1880 / TD-SCDMA 2010
460 01 China Unicom China Unicom Operational GSM 900 / GSM 1800 / UMTS 2100 CDMA network sold to China Telecom, WCDMA commercial trial started in May 2009 and in full commercial operation as of October 2009.
460 02 China Mobile China Mobile Operational GSM 900 / GSM 1800 / TD-SCDMA 1880 / TD-SCDMA 2010  
460 03 China Telecom China Telecom Operational CDMA2000 800 / CDMA2000 2100 EV-DO
460 05 China Telecom China Telecom Operational    
460 06 China Unicom China Unicom Operational GSM 900 / GSM 1800 / UMTS 2100  
460 07 China Mobile China Mobile Operational GSM 900 / GSM 1800 / TD-SCDMA 1880 / TD-SCDMA 2010  
460 20 China Tietong China Tietong Operational GSM-R  

文章转自:http://blog.csdn.net/jiayou8809/article/details/8657974

详细参考:http://en.wikipedia.org/wiki/Mobile_Network_Code

iPhone判断运营商,布布扣,bubuko.com

iPhone判断运营商

原文:http://www.cnblogs.com/Fc-ios/p/3903512.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!