Merge branch 'charlesmchen/countryNameVsiOS8'

This commit is contained in:
Matthew Chen 2017-07-20 09:14:49 -04:00
commit d98c07ecff

View File

@ -85,6 +85,9 @@
NSDictionary *countryCodeComponent = @{NSLocaleCountryCode : countryCode};
NSString *identifier = [NSLocale localeIdentifierFromComponents:countryCodeComponent];
NSString *country = [NSLocale.currentLocale displayNameForKey:NSLocaleIdentifier value:identifier];
if (country.length < 1) {
country = [NSLocale.systemLocale displayNameForKey:NSLocaleIdentifier value:identifier];
}
return country;
}