How can whatsapp know country code upon first run on iphone
问题 When I first install whatsapp on iphone, when I open it, the first screen already knows my sim cards location and shows the country code. How does whatsapp know this ? As apple rejects all the apps that use sim card info programmatically. 回答1: in your .h file you need to: #import <CoreTelephony/CTCarrier.h> #import <CoreTelephony/CTTelephonyNetworkInfo.h> And this function will get the country code: -(NSString*)getCountryDialingCode { NSDictionary *dialingCodes = [[NSDictionary alloc