From 7d23ccfcbf2ed1fafa5881955200938074d54b89 Mon Sep 17 00:00:00 2001 From: levantAJ Date: Sun, 18 Oct 2020 10:04:42 +0700 Subject: [PATCH] Update readme --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/README.md b/README.md index ef30718..35f1d1d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,71 @@ +[![Pod Version](https://cocoapod-badges.herokuapp.com/v/CountryKit/badge.png)](http://cocoadocs.org/docsets/CountryKit/) +[![Pod Platform](https://cocoapod-badges.herokuapp.com/p/CountryKit/badge.png)](http://cocoadocs.org/docsets/CountryKit/) +[![Pod License](https://cocoapod-badges.herokuapp.com/l/CountryKit/badge.png)](https://www.apache.org/licenses/LICENSE-2.0.html) + # CountryKit List of all countries in the world (name, code, phone code) + + + +## Requirements + +- iOS 9.0 or later +- Xcode 11.0 or later + +## Install + +### Installation with CocoaPods + +```ruby +pod 'CountryKit', '1.0' +``` + +### Build Project + +At this point your workspace should build without error. If you are having problem, post to the Issue and the +community can help you solve it. + +## How to use: + +```swift +import CountryKit +``` + +#### Get current country: + +```swift +countryKit.currentCountry { result in + switch result { + case .success(let country): + print(country.code, country.name, country.dialCode) + case .failure(let error): + print(error) + } +``` + +#### Get all countries + +```swift +CountryKit().allCountries { result in + switch result { + case .success(let countries): + print(countries) + case .failure(let error): + print(error) + } +} +``` + +## Author +- [Tai Le](https://github.com/levantAJ) + +## Communication +- If you **found a bug**, open an issue. +- If you **have a feature request**, open an issue. +- If you **want to contribute**, submit a pull request. + + +## Licenses + +All source code is licensed under the [MIT License](https://raw.githubusercontent.com/levantAJ/CountryKit/master/LICENSE). +