Contents

mobileCountryCode

The mobile country code (MCC) for the user’s cellular service provider.

Declaration

var mobileCountryCode: String? { get }

Discussion

A read-only NSString object that contains the numeric mobile country code for the user’s cellular service provider. MCCs are defined by ITU-T Recommendation E.212, “List of Mobile Country or Geographical Area Codes”. Typing this property as an NSString object, rather than a number type, preserves leading zeroes in MCCs.

The value for this property is nil if any of the following apply:

  • There is no SIM card in the device.

  • The device is outside of cellular service range.

The value may be nil on hardware prior to iPhone 4S when in airplane mode.

See Also

Getting Information About the Cellular Service Provider