<!--
{
  "availability" : [
    "iOS: 4.0.0 - 16.0.0",
    "iPadOS: 4.0.0 - 16.0.0",
    "macCatalyst: 13.1.0 - 16.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreTelephony",
  "identifier" : "/documentation/CoreTelephony/CTCarrier/mobileCountryCode",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Telephony"
    ],
    "preciseIdentifier" : "c:objc(cs)CTCarrier(py)mobileCountryCode"
  },
  "title" : "mobileCountryCode"
}
-->

# mobileCountryCode

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

```
var mobileCountryCode: String? { get }
```

## Discussion

A read-only <doc://com.apple.documentation/documentation/Foundation/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 <doc://com.apple.documentation/documentation/Foundation/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)