CTCarrier.mobileNetworkCode returns value despite no SIM card

Originator:futuretap
Number:rdar://12412129 Date Originated:02-Oct-2012 01:08 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:6.0
Classification:Other Reproducible:Always
 
The CTCarrier properties mobileNetworkCode and mobileCountryCode are set even if the SIM card is taken out of the device.

The documentation clearly states:

The value for this property is nil if any of the following apply:
- The device is in Airplane mode.
- There is no SIM card in the device.
- The device is outside of cellular service range.


Steps to Reproduce:
Remove the SIM card of an iPhone. Run this code:

	CTCarrier *carrier = [[[CTTelephonyNetworkInfo alloc] init] autorelease].subscriberCellularProvider;
	NSLog(@"mobileNetworkCode: %@ mobileCountryCode: %@", carrier.mobileNetworkCode, carrier.mobileCountryCode);

Expected Results:
This should be logged:
mobileNetworkCode: (null) mobileCountryCode: (null)

Actual Results:
This is logged (Carrier T-Mobile Germany in my case):
mobileNetworkCode: 01 mobileCountryCode: 262

Regression:
This worked under iOS 5.1.

Notes:
Under iOS 6.0 there seems to be no way to find out if the user is actually logged in to a specific carrier's network.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!