CTCarrier should have the information you need.
Edit: CTTelephonyNetworkInfo responds to a user switching a SIM session, and provides you with a CTCarrier
instance.
Sample code (in the application delegate):
Pay attention to the following message about the properties of CTCarrier
(I would recommend not to perform permanent one-way locking if zero carrier is read):
"The value for this property is nil
if one of the following conditions applies:
- The device is in flight mode.
- The device does not have a SIM card.
- The device is out of cellular range.
From the CTCarrier
properties for checking, I would recommend carrierName
specifically, since it does not change when the user is roaming, so the application will work as long as the SIM card is attached to your desired operator.
source share