I'm using this code to get the list of countries:
for (NSString *code in [NSLocale ISOCountryCodes])
{
NSString *identifier = [NSLocale localeIdentifierFromComponents:@{NSLocaleCountryCode: code}];
NSString *countryName = [[NSLocale currentLocale] displayNameForKey:NSLocaleIdentifier value:identifier];
NSLog(countryName);
}
This works fine in iOS 7.x but fails in iOS8 (beta 2) - with countryName
always being nil.
Anyone found an alternative yet?