I\'ve already seen two similar questions to mine, but the answers for those questions do not work for me. I have an old project with a list of countries manually typed out insid
Same as Ian's but shorter
let countries = NSLocale.ISOCountryCodes().map { (code:String) -> String in
let id = NSLocale.localeIdentifierFromComponents([NSLocaleCountryCode: code])
return NSLocale(localeIdentifier: "en_US").displayNameForKey(NSLocaleIdentifier, value: id) ?? "Country not found for code: \(code)"
}
print(countries)