首页 > 代码库 > iPhone判断运营商

iPhone判断运营商

- (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
46000China MobileChina MobileOperationalGSM 900 / GSM 1800 / TD-SCDMA 1880 / TD-SCDMA 2010
46001China UnicomChina UnicomOperationalGSM 900 / GSM 1800 / UMTS 2100CDMA network sold to China Telecom, WCDMA commercial trial started in May 2009 and in full commercial operation as of October 2009.
46002China MobileChina MobileOperationalGSM 900 / GSM 1800 / TD-SCDMA 1880 / TD-SCDMA 2010 
46003China TelecomChina TelecomOperationalCDMA2000 800 / CDMA2000 2100EV-DO
46005China TelecomChina TelecomOperational  
46006China UnicomChina UnicomOperationalGSM 900 / GSM 1800 / UMTS 2100 
46007China MobileChina MobileOperationalGSM 900 / GSM 1800 / TD-SCDMA 1880 / TD-SCDMA 2010 
46020China TietongChina TietongOperationalGSM-R 

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

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