{"id":21635683,"url":"https://github.com/levantaj/countrysource","last_synced_at":"2025-06-23T18:37:40.170Z","repository":{"id":56906729,"uuid":"305004435","full_name":"levantAJ/CountrySource","owner":"levantAJ","description":"List of all countries in the world (name, code, phone code)","archived":false,"fork":false,"pushed_at":"2020-11-08T03:21:26.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T22:12:38.570Z","etag":null,"topics":["country","country-codes","countrycode","current","dialcodes","phone","phonenumber"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levantAJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-18T02:05:58.000Z","updated_at":"2020-11-08T03:19:04.000Z","dependencies_parsed_at":"2022-08-20T19:20:22.794Z","dependency_job_id":null,"html_url":"https://github.com/levantAJ/CountrySource","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/levantAJ/CountrySource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FCountrySource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FCountrySource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FCountrySource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FCountrySource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levantAJ","download_url":"https://codeload.github.com/levantAJ/CountrySource/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FCountrySource/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261534758,"owners_count":23173465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["country","country-codes","countrycode","current","dialcodes","phone","phonenumber"],"created_at":"2024-11-25T03:23:59.228Z","updated_at":"2025-06-23T18:37:40.143Z","avatar_url":"https://github.com/levantAJ.png","language":"Swift","readme":"[![Pod Version](https://cocoapod-badges.herokuapp.com/v/CountrySource/badge.png)](http://cocoadocs.org/docsets/CountrySource/)\n[![Pod Platform](https://cocoapod-badges.herokuapp.com/p/CountrySource/badge.png)](http://cocoadocs.org/docsets/CountrySource/)\n[![Pod License](https://cocoapod-badges.herokuapp.com/l/CountrySource/badge.png)](https://www.apache.org/licenses/LICENSE-2.0.html)\n\n# CountrySource\nProvides list of all countries in the world (name, code, phone code) \u0026 determine current country.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6329656/96357601-3b870300-1128-11eb-9091-f98cf9a93924.jpeg\" width=\"300\"\u003e \u003cimg src=\"https://user-images.githubusercontent.com/6329656/96357606-4e99d300-1128-11eb-9eee-2d889ca0ed60.jpeg\" width=\"300\"\u003e\n\n## Requirements\n\n- iOS 9.0 or later\n- Xcode 11.0 or later\n\n## Install\n\n### Installation with CocoaPods\n\n```ruby\npod 'CountrySource', '1.2'\n```\n\n### Build Project\n\nAt this point your workspace should build without error. If you are having problem, post to the Issue and the\ncommunity can help you solve it.\n\n## How to use:\n\n```swift\nimport CountrySource\n```\n\n#### Get current country:\n\n```swift\nCountrySource().currentCountry { result in\n    switch result {\n    case .success(let country):\n        print(country.code, country.name, country.dialCode)\n    case .failure(let error):\n        print(error)\n    }\n```\n\n#### Get all countries\n\n```swift\nCountrySource().allCountries { result in\n    switch result {\n    case .success(let countries):\n        print(countries)\n    case .failure(let error):\n        print(error)            \n    }\n}\n```\n\n## Author\n- [Tai Le](https://github.com/levantAJ)\n\n## Communication\n- If you **found a bug**, open an issue.\n- If you **have a feature request**, open an issue.\n- If you **want to contribute**, submit a pull request.\n\n\n## Licenses\n\nAll source code is licensed under the [MIT License](https://raw.githubusercontent.com/levantAJ/CountrySource/master/LICENSE).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevantaj%2Fcountrysource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevantaj%2Fcountrysource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevantaj%2Fcountrysource/lists"}