From 06ebcd6fa81cd9a66284788d89059b8a1f12dbf5 Mon Sep 17 00:00:00 2001 From: levantAJ Date: Sun, 8 Nov 2020 10:18:55 +0700 Subject: [PATCH] Fix error message --- CountrySource.podspec | 2 +- CountrySource/CountrySource.swift | 4 +++- README.md | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CountrySource.podspec b/CountrySource.podspec index 1b4d134..5bb1cdb 100644 --- a/CountrySource.podspec +++ b/CountrySource.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'CountrySource' - s.version = '1.1' + s.version = '1.2' s.summary = 'CountrySource provides list of all countries in the world.' s.description = <<-DESC CountrySource written on Swift 5.0 by levantAJ diff --git a/CountrySource/CountrySource.swift b/CountrySource/CountrySource.swift index 9918e33..f667dce 100644 --- a/CountrySource/CountrySource.swift +++ b/CountrySource/CountrySource.swift @@ -49,8 +49,10 @@ public extension CountrySource { public enum CountrySourceError: Int, Error { case notFound = 1000 +} - var localizedDescription: String { +extension CountrySourceError: LocalizedError { + public var errorDescription: String? { switch self { case .notFound: return NSLocalizedString("Not found", comment: "") diff --git a/README.md b/README.md index 178ba9a..1d4a980 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Provides list of all countries in the world (name, code, phone code) & determine ### Installation with CocoaPods ```ruby -pod 'CountrySource', '1.1' +pod 'CountrySource', '1.2' ``` ### Build Project