Skip to content

Swift Package to Handle the list of country easily

License

Notifications You must be signed in to change notification settings

satan87/CountryLibrary

Repository files navigation

CountryLibrary

A small extension to handle countries within Swift Swift

You have a country Struct with

  • The Country Code
  • The Country Name
  • The Country Flag

Code Example :

All countries from Swift Locale

CountryLibrary.countries

Already ordered by name

To retrieve a Country from a string

By Country Code

"FR".country(by: .code)

By Country Name

"Canada".country(by: .name)