Skip to content

callingCodeForCountryCode returning NULL #21

Open
@hydralisk01

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions