RMPhoneFormat
RMPhoneFormat copied to clipboard
callingCodeForCountryCode returning NULL
- Running this function on country codes from [NSLocale ISOCountryCodes]
- I suspect the Default.phoneformat file could be missing something? I am getting the file from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AppSupport.framework/
RMPhoneFormat *format = [RMPhoneFormat instance];
NSMutableArray *invalidCodes = [[NSMutableArray alloc] init];
for (NSString *countryCode in [NSLocale ISOCountryCodes])
{
NSString *callingCode = [format callingCodeForCountryCode:countryCode];
if (!callingCode) [invalidCodes addObject:countryCode];
}
NSLog(@"invalidCodes: %@", invalidCodes);
invalidCodes: (
AX,
BL,
BQ,
BV,
CC,
CW,
CX,
EH,
GG,
GS,
HM,
IM,
JE,
MF,
NF,
PN,
SJ,
SS,
TF,
TL,
UM,
YT
)