3

I am trying to get CellID and LAC programmatically in iOS 10.x.

I tried Get CellID, MCC, MNC, LAC, and Network in iOS 5.1 but this is not working in 8.3 and above versions.

Can anyone help me to achieve this?

Community
  • 1
  • 1
Akhilesh Mani
  • 3,502
  • 5
  • 28
  • 59

1 Answers1

1
//mcc
CTTelephonyNetworkInfo *netInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netInfo subscriberCellularProvider];
NSString *mcc = [carrier mobileCountryCode];

//mnc
NSString *mnc = [carrier mobileNetworkCode];
NSLog(@"mcc: %@, mnc: %@", mcc, mnc);
Akshay Phulare
  • 1,359
  • 2
  • 10
  • 15