I need to retrieve CellID, MCC, MNC, LAC and Network (GSM, 3G) of the current Serving Cell Tower in iOS 5.1 (iPhone 4S). I know this information is available because I can see it in FieldTest Mode (accessible after calling ****3001#12345#****). I suppose it to be accessible via Private/Undocumented iOS Frameworks.
In the question iphone, check values of cellId / Lac the author indicates I can get radio Informations cellId, Lac, MNC, MCC on iOS, but no information on how to do this is provided.
Can anybody tell me how to get this info?
suscriberCellularProvider is an object method (vs class method).
You can take a look how to use it here: Determine iPhone user's country
I think CTCarrier has MCC and MNC.
You can check network type using the code from this question: How to check if iPhone supports CDMA or GSM
And look this question for CellID: CTServerConnectionGetCellID routine core telephony
I know three ways on how you can do it on iOS 5.x - 7.x. All of them use private APIs from CoreTelephony.framework. Supports both GSM and UMTS.
1) Using cell monitor
...
2) Using CTTelephonyCenter
kCTRegistrationCellChangedNotification
is sent every time current serving cell tower is changed....
3) This returns current serving cell tower
...
UPDATE
On ARM64 (iPhone 5S) there is an issue with all CoreTelephony functions that accept
struct CTResult
argument. Apparently, 64-bit version of CoreTelephony exports these functions withoutstruct CTResult
argument. Because of that you will get an error on ARM64 if you call these functions like you did in the past - arguments will be wrong. I updated function declarations so that they work on both 32-bit and 64-bit ARM architectures. I tested it and it works on both iPhone 4S and iPhone 5S.This only applies to ARM64. If you build your project for 32-bit ARM architecture then there is no such issue. Your application will use 32-bit version of CoreTelephony which expects
struct CTResult
argument.8.3 UPDATE
As of iOS 8.3 all of the above solutions require entitlement to work
Not only cell monitor is protected but it seems like all of the CoreTelephony notifications now require that entitlement to work. For example,
kCTMessageReceivedNotification
also affected.The code below is how to insert to che entitlement to meke the code work on ios 8.3. As of iOS 8.3 all of the above solutions require entitlement to work
Indeed, tha above code mentioned is said that can be run to get the lac and cell on ios 8.3 and above. But I really don't know how to insert the above on a jailbroken phone. Could anyone give any detail information.