RMPhoneFormat icon indicating copy to clipboard operation
RMPhoneFormat copied to clipboard

callingCodeForCountryCode returning NULL

Open hydralisk01 opened this issue 9 years ago • 0 comments

  • 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
)

hydralisk01 avatar Feb 17 '16 03:02 hydralisk01