Ios7 test OK
[Ctsimsuppgetgetsimstatus () isequaltostring: kctsimsuppsimsimstatusnotinserted] You can determine whether a SIM card is inserted. The premise is to copy the following code to a header file and then introduce coretelephony. framework.
Extern nsstring * const kctsmessagereceivednotification;
Extern nsstring * const kctsmessagereplacereceivednotification;
Extern nsstring * const kctsimsuppsimsimstatusnotinserted;
Extern nsstring * const kctsimsuppsimsimstatusready;
Id cttelephonycentergetdefault (void );
Void cttelephonycenteraddobserver (ID, ID, cfnotificationcallback, nsstring *, void *, INT );
Void cttelephonycenterremoveobserver (ID, ID, nsstring *, void *);
Int ctsmessagegetunreadcount (void );
Int ctsmessagegetrecordidentifier (void * MSG );
Nsstring * ctsimsupportgetsimstatus ();
Nsstring * ctsimsuppcopycopymobilesubscriberidentity ();
Id ctsmessagecreate (void * unknow/* always 0 */, nsstring * number, nsstring * text );
Void * ctsmessagecreatereply (void * unknow/* always 0 */, void * forwardto, nsstring * text );
Void * ctsmessagesend (ID server, Id MSG );
Nsstring * ctsmessagecopyaddress (void *, void *);
Nsstring * ctsmessagecopytext (void *, void *);
Check whether SIM card is installed