Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get list of supported currencies in iOS

I need to show currency list so that user could select one. I want to include all currencies supported by iOS.

Is there a way in iOS to get codes and names for all supported currencies?

Thanks in advance!

like image 412
tonytony Avatar asked Oct 17 '12 13:10

tonytony


2 Answers

Here you are:

NSLocale *locale = [NSLocale currentLocale];
for (NSString *code in [NSLocale ISOCurrencyCodes]) {
    NSLog(@"%@ : %@", code, [locale displayNameForKey:NSLocaleCurrencyCode value:code]);
}
like image 154
Attila H Avatar answered Oct 06 '22 04:10

Attila H


Swift 5

let currencys = Locale.isoCurrencyCodes

Array of all unique currencies:

let list = ["AED - AED","AFN - ؋","ALL - ALL","AMD - ֏","ANG - ANG","AOA - Kz","ARS - $","AUD - $","AWG - AWG","AZN - ₼","BAM - KM","BBD - BBD","BDT - ৳","BGN - BGN","BHD - د.ب.‏","BIF - FBu","BMD - $","BND - $","BOB - Bs","BRL - R$","BSD - $","BTN - Nu.","BWP - P","BYN - Br","BZD - $","CAD - CA$","CDF - FC","CHF - CHF","CLP - $","CNY - ¥","COP - $","CRC - ₡","CUP - $","CVE - ​","CZK - CZK","DJF - Fdj","DKK - DKK","DOP - RD$","DZD - DA","EGP - ج.م.‏","ERN - Nfk","ETB - Br","EUR - €","FJD - $","FKP - FKP","GBP - £","GEL - ₾","GHS - GH₵","GIP - £","GMD - GMD","GNF - GNF","GTQ - Q","GYD - GYD","HKD - HK$","HNL - L","HRK - HRK","HTG - HTG","HUF - Ft","IDR - Rp","ILS - ₪","INR - ₹","IQD - د.ع.‏","IRR - ریال","ISK - ISK","JMD - $","JOD - د.أ.‏","JPY - ¥","KES - Ksh","KGS - сом","KHR - ៛","KMF - CF","KPW - KPW","KRW - ₩","KWD - د.ك.‏","KYD - KYD","KZT - ₸","LAK - ₭","LBP - ل.ل.‏","LKR - රු.","LRD - $","LYD - د.ل.‏","MAD - MAD","MDL - L","MGA - Ar","MKD - ден","MMK - K","MNT - ₮","MOP - MOP$","MRU - أ.م.","MUR - Rs","MVR - ރ.","MWK - MK","MXN - $","MYR - RM","MZN - MTn","NAD - $","NGN - ₦","NIO - C$","NOK - NOK","NPR - नेरू","NZD - $","OMR - ر.ع.‏","PAB - B/.","PEN - S/","PGK - K","PHP - ₱","PKR - ر","PLN - zł","PYG - Gs.","QAR - ر.ق.‏","RON - RON","RSD - RSD","RUB - RUB","RWF - RF","SAR - ر.س.‏","SBD - $","SCR - SR","SDG - ج.س.","SEK - kr","SGD - $","SHP - £","SLL - SLL","SOS - S","SRD - SRD","SSP - £","STN - Db","SYP - LS","SZL - E","THB - ฿","TJS - сом.","TMT - TMT","TND - DT","TOP - T$","TRY - ₺","TTD - TTD","TWD - $","TZS - TSh","UAH - UAH","UGX - USh","USD - $","UYU - $","UZS - soʻm","VND - ₫","VUV - VT","WST - WS$","XAF - FCFA","XCD - $","XOF - CFA","XPF - FCFP","YER - ر.ي.‏","ZAR - R","ZMW - K"]
like image 21
shbedev Avatar answered Oct 06 '22 06:10

shbedev