CTCarrier Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/CoreTelephony.framework/ |
| Availability | Available in iOS 4.0 and later. |
| Declared in | CTCarrier.h |
Overview
Use the CTCarrier class to obtain information about the user’s home cellular service provider, such as its unique identifier and whether or not it allows VoIP (Voice over Internet Protocol) calls on its network.
Tasks
Obtaining Information About the Cellular Service Provider
-
allowsVOIPproperty -
carrierNameproperty -
isoCountryCodeproperty -
mobileCountryCodeproperty -
mobileNetworkCodeproperty
Properties
allowsVOIP
Indicates if the carrier allows VoIP calls to be made on its network. (read-only)
Discussion
A read-only Boolean value that is YES if the carrier allows VoIP calls to be made on its network, or NO if not.
If you configure a device for a carrier and then remove the SIM card, this property retains the Boolean value indicating the carrier’s policy regarding VoIP.
Availability
- Available in iOS 4.0 and later.
Declared In
CTCarrier.hcarrierName
The name of the user’s home cellular service provider. (read-only)
Discussion
This string is provided by the carrier and formatted for presentation to the user. The value does not change if the user is roaming; it always represents the provider with whom the user has an account.
If you configure a device for a carrier and then remove the SIM card, this property retains the name of the carrier.
The value for this property is nil if the device was never configured for a carrier.
Availability
- Available in iOS 4.0 and later.
Declared In
CTCarrier.hisoCountryCode
The ISO country code for the user’s cellular service provider. (read-only)
Discussion
This property uses the ISO 3166-1 country code representation.
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.
Availability
- Available in iOS 4.0 and later.
Declared In
CTCarrier.hmobileCountryCode
The mobile country code (MCC) for the user’s cellular service provider. (read-only)
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, ensures that leading zeroes in MCCs are respected.
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.
Availability
- Available in iOS 4.0 and later.
Declared In
CTCarrier.hmobileNetworkCode
The mobile network code (MNC) for the user’s cellular service provider. (read-only)
Discussion
A read-only NSString object that represents the numeric mobile network code for the user’s cellular service provider. Typing this property as an NSString object, rather than a number type, ensures that leading zeroes in MNCs are respected.
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.
Availability
- Available in iOS 4.0 and later.
Declared In
CTCarrier.h© 2011 Apple Inc. All Rights Reserved. (Last updated: 2011-10-24)