Reputation: 3552
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?
Upvotes: 3
Views: 957
Reputation: 1599
//mcc
CTTelephonyNetworkInfo *netInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netInfo subscriberCellularProvider];
NSString *mcc = [carrier mobileCountryCode];
//mnc
NSString *mnc = [carrier mobileNetworkCode];
NSLog(@"mcc: %@, mnc: %@", mcc, mnc);
Upvotes: 1