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 inside a set of square brackets.
I can easily use this in my pickerView but I'm wondering if there is a more efficient way to do this?
I will be using the list of countries in a UIPickerView.
Same as Ian's but shorter
Update to vedo27's answer but in Swift 5:
Also for having a sorted array for countries in Alphabetical order add this below in your order after fetching countries list
Here is @vedo27 's answer in Swift 3
SWIFT 3 and 4
SWIFT 4
Here is an elegant way of doing it in Swift 4
Alternatively, you can have it in swift 4 and localized by the system language.