Getting the local iPhone number through SDK

前端 未结 4 1138
没有蜡笔的小新
没有蜡笔的小新 2020-12-10 00:31

I am looking for a SDK API to retrieve the device\'s local phone number
from the SIM card. Is there a way to do it?

4条回答
  •  醉梦人生
    2020-12-10 00:53

    CFShow([[NSUserDefaults standardUserDefaults] objectForKey:@"SBFormattedPhoneNumber"]); 
    
    NSString *path = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Preferences/.GlobalPreferences.plist"];  
    NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];  
    CFShow(dict); 
    

提交回复
热议问题