[Ctsimsupportgetsimstatus () isequaltostring:kctsimsupportsimstatusnotinserted]
You can tell if the SIM card is plugged in.
Need coretelephony.framework.
/** * Detect if there is a SIM card * [Ctsimsupportgetsimstatus () isequaltostring:kctsimsupportsimstatusnotinserted] */extern NSString* Const Kctsmsmessagereceivednotification;extern nsstring* Const Kctsmsmessagereplacereceivednotification;extern nsstring* Const kctsimsupportsimstatusnotinserted; For inserting SIM card extern nsstring* Const Kctsimsupportsimstatusready; SIM card ID cttelephonycentergetdefault (void) inserted, void Cttelephonycenteraddobserver (Id,id,cfnotificationcallback, Nsstring*,void*,int); void Cttelephonycenterremoveobserver (id,id,nsstring*,void*); int Ctsmsmessagegetunreadcount ( void); int ctsmsmessagegetrecordidentifier (void * msg); NSString * Ctsimsupportgetsimstatus (); NSString * Ctsimsupportcopymobilesubscriberidentity (); ID ctsmsmessagecreate (void* unknow/*always 0*/,NSString* number,nsstring* text); void * Ctsmsmessagecreatereply (void* unknow/*always 0*/,void * forwardto,nsstring* text); void* Ctsmsmessagesend (ID server,id msg); NSString *ctsmsmessagecopyaddress (void *, void *); NSString *ctsmsmessaGecopytext (void *, void *);
IOS detects if the phone has a SIM card installed