Latest 0.1.0
License MIT
Platforms ios 10.0


What is ISO3661-1 Alpha 2 for?

Provides country codes as defined by ISO3166-1 alpha 2 in swift. Simple helper type to for use in connection with IBAN/BIC check.

Build Status
Carthage Compatible

How to use ISO3166-1-Alpha2

"DE".isISO3166_1Alpha2 // Remember that you have to provide an uppercase string

ISO3166-1-Alpha2 Initializer

Besides the check isISO3166_1Alpha2 one create an ISO3166-1 Alpha2 enum by

// Init which accepts only lower case strings.
ISO3166_1Alpha2(rawValue: "YourLowerCaseString")

// Any case string. This should be your default initializer.
ISO3166_1Alpha2(value: "AnyCaseString")

// A country name as specified for the type
ISO3166_1Alpha2(countryName: "Country Name")


Installation with Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate ISO3661-1 Alpha 2 into your Xcode project using Carthage, specify it in your Cartfile:

github "HHuckebein/ISO3166-1-Alpha2"

Run carthage to build the framework and drag the built ISO3166_1Alpha2.framework into your Xcode project.

Installation with CocoaPods

You can install ISO3166-1-Alpha2 by including the following line in your Podfile.

pod 'ISO3166_1Alpha2', '~> 0.1.0'


RABE_IT Services, [email protected]


Base64 is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "ISO3166_1Alpha2",
    "version": "0.1.0",
    "summary": "A simple helper type when dealing with ISO3166-1 Alpha 2 codes.",
    "description": "Provides some functions to turn a string into a ISO3166-1 Alpha 2 (given the country name you provide is valid). Main functionality lies in conjuctions with validating an IBAN.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "HHuckebein": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.0"
    "platforms": {
        "ios": "10.0"
    "source_files": "Sources/**/*.swift",
    "swift_version": "4.1"

Pin It on Pinterest

Share This