iOS 检测手机是否安装SIM卡
2018-07-20 来源:open-open
[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 *);
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点!
本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。
最新资讯
热门推荐