Undocumented method to find sim card availability in ios?

流过昼夜 提交于 2019-12-12 02:53:35

问题


I have found an undocumented method for detecting sim card availability in iphone. This method needs CoreTelephony.framework

NSString * CTSIMSupportGetSIMStatus();
int CTGetSignalStrength();

NSString *status = CTSIMSupportGetSIMStatus();

NSLog(@"Sim card status %@",status); 

This method works well. can i use this method in my project? If i use this undocumented method, will apple reject my app? plz let me know... Thanks


回答1:


You can not use undocumented method as Apple says that they can change the implementation for bug fixing or by updating the SDK cause App crash. They do not allow the use of Private API and trace at submission at store. Mostly private method can be found in debugging at Xcode and start with _Underscore so you can try alternative to achieving things if you do not want to get reject your application later at submission.



来源:https://stackoverflow.com/questions/20779785/undocumented-method-to-find-sim-card-availability-in-ios

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!