[CTSIMSupportGetSIMStatus() isEqualToString:kCTSIMSupportSIMStatusNotInserted]

可以判断是否插入了sim卡。

需要CoreTelephony.framework。

    /**  
     *  检测是否有SIM卡  
     * [CTSIMSupportGetSIMStatus() isEqualToString:kCTSIMSupportSIMStatusNotInserted]  
     */   
    extern NSString* const kCTSMSMessageReceivedNotification;   
    extern NSString* const kCTSMSMessageReplaceReceivedNotification;   
    extern NSString* const kCTSIMSupportSIMStatusNotInserted;   // 为插入SIM卡   
    extern NSString* const kCTSIMSupportSIMStatusReady;         // 已插入SIM卡   
       
    id CTTelephonyCenterGetDefault(void);   
    void CTTelephonyCenterAddObserver(id,id,CFNotificationCallback,NSString*,void*,int);   
    void CTTelephonyCenterRemoveObserver(id,id,NSString*,void*);   
    int CTSMSMessageGetUnreadCount(void);   
       
    int CTSMSMessageGetRecordIdentifier(voidvoid * msg);   
    NSString * CTSIMSupportGetSIMStatus();   
    NSString * CTSIMSupportCopyMobileSubscriberIdentity();   
       
    id  CTSMSMessageCreate(void* unknow/*always 0*/,NSString* number,NSString* text);   
    voidvoid * CTSMSMessageCreateReply(void* unknow/*always 0*/,voidvoid * forwardTo,NSString* text);   
       
    void* CTSMSMessageSend(id server,id msg);   
       
    NSString *CTSMSMessageCopyAddress(voidvoid *, voidvoid *);   
    NSString *CTSMSMessageCopyText(voidvoid *, voidvoid *);  

发布评论

分享到:

IT虾米网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!

用CATextLayer来实现一个UILabel详解
你是第一个吃螃蟹的人
发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。