1. 首先要导入CoreTelephony的Private Framework;

 

2. 在导入CoreTelephony后使用CTSettingCopyMyPhoneNumber()将出现以下警告:

Semantic Issue
Implicit declaration of function 'CTSettingCopyMyPhoneNumber' is invalid in C99

 解决方法为在使用CTSettingCopyMyPhoneNumber()的.m文件中加入如下语句:

extern NSString *CTSettingCopyMyPhoneNumber();

 

posted on 2013-04-08 10:05  BankFish  阅读(3362)  评论(0编辑  收藏  举报