CTTelephonyNetworkInfo Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/CoreTelephony.framework/
Availability
Available in iOS 4.0 and later.
Declared in
CTTelephonyNetworkInfo.h
Related sample code

Overview

Use the CTTelephonyNetworkInfo class to respond to changes in the user’s cellular service provider. This occurs, for example, if a user swaps the device’s SIM card with one from another provider, while your application is running. This class also gives you access to the CTCarrier object, which contains information about the user’s home cellular service provider.

Tasks

Obtaining Information About the Cellular Service Provider

Properties

subscriberCellularProvider

Information about the user’s cellular service provider. (read-only)

@property(readonly, retain) CTCarrier *subscriberCellularProvider
Discussion

A CTCarrier object that contains information about the user’s home cellular service provider—that is, the provider with whom the user has an account. This information is available immediately after you allocate and initialize the CTTelephonyNetworkInfo object.

Availability
  • Available in iOS 4.0 and later.
Declared In
CTTelephonyNetworkInfo.h

subscriberCellularProviderDidUpdateNotifier

Dispatched when the user’s cellular service provider information changes.

@property(nonatomic, copy) void (^subscriberCellularProviderDidUpdateNotifier)(CTCarrier*);
Discussion

A block object that is dispatched on the default priority global dispatch queue when the user’s cellular provider information changes. This occurs, for example, if a user swaps the device’s SIM card with one from another provider, while your application is running.

To handle changes in cellular service provider information, define a block in your application and assign it to this property. The block must be implemented to support being called from any context.

Availability
  • Available in iOS 4.0 and later.
Declared In
CTTelephonyNetworkInfo.h