BLACK FRIDAY SALE: Save 50% on all my Swift books and bundles! >>

How do I get UK currency on my UK Mac?

Forums > 100 Days of SwiftUI


Text(Locale.current.currency?.identifier ?? "XYZ") Text(100.00, format: .currency(code: Locale.current.currency?.identifier ?? "GBP" ))

The first Text command outputs "USD" and the second $100.00.

Can I please ask for some help in understanding why my Mac which is using UK £'s everywhere, in every other app, is not doing the same in Xcode, where is it getting USD and $'s from?

I had expected Xcode to default to the same as my MAC but this does seem to be the case.

Any help appreciated.



In Xcode in your project settings there is a section Localization. The "Base" Developer language is usually English US and doesn't respect your Mac settings. F.e. my regional settings on my Mac are German and in a new project Xcode just doesn't care. You can add English UK. If you develop for iPhone and use the simulator you have to change the regional settings on the iPhone simulator as well.


Hi, I am really sorry but can I please ask you to be much more specefic about what I need to change. I've found Localization and added English UK but my project is still in USD.

Thank you for your help


What kind of app are you developing? MacOS, iOS?


Hacking with Swift is sponsored by Guardsquare

SPONSORED AppSweep by Guardsquare helps developers automate the mobile app security testing process with fast, free scans. By using AppSweep’s actionable recommendations, developers can improve the security posture of their apps in accordance with security standards like OWASP.

Learn more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.