diff --git a/CountryPickerView.podspec b/CountryPickerView.podspec index 1fae69f..e3a0d26 100755 --- a/CountryPickerView.podspec +++ b/CountryPickerView.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |spec| spec.name = "CountryPickerView" - spec.version = "3.1.3" + spec.version = "3.2.0" spec.summary = "A simple, customizable view for selecting countries in iOS apps." spec.homepage = "https://github.com/kizitonwose/CountryPickerView" spec.license = "MIT" spec.author = { "Kizito Nwose" => "kizitonwose@gmail.com" } - spec.platform = :ios, "8.0" + spec.platform = :ios, "9.0" spec.swift_versions = ['5.0'] spec.source = { :git => "https://github.com/kizitonwose/CountryPickerView.git", :tag => spec.version } spec.source_files = "CountryPickerView/**/*.{swift}" diff --git a/CountryPickerView/Assets/CountryPickerView.bundle/Data/CountryCodes.json b/CountryPickerView/Assets/CountryPickerView.bundle/Data/CountryCodes.json index 2a589dc..64fa9c8 100755 --- a/CountryPickerView/Assets/CountryPickerView.bundle/Data/CountryCodes.json +++ b/CountryPickerView/Assets/CountryPickerView.bundle/Data/CountryCodes.json @@ -20,7 +20,7 @@ "code": "DZ" }, { -"name": "AmericanSamoa", +"name": "American Samoa", "dial_code": "+1684", "code": "AS" }, diff --git a/CountryPickerView/Assets/CountryPickerView.bundle/Images/TK.png b/CountryPickerView/Assets/CountryPickerView.bundle/Images/TK.png old mode 100755 new mode 100644 index 3f2c054..dda0f4d Binary files a/CountryPickerView/Assets/CountryPickerView.bundle/Images/TK.png and b/CountryPickerView/Assets/CountryPickerView.bundle/Images/TK.png differ diff --git a/CountryPickerView/CountryPickerView.swift b/CountryPickerView/CountryPickerView.swift index 5a6801b..9768b3f 100644 --- a/CountryPickerView/CountryPickerView.swift +++ b/CountryPickerView/CountryPickerView.swift @@ -125,9 +125,9 @@ public class CountryPickerView: NibView { countryDetailsLabel.font = font countryDetailsLabel.textColor = textColor if showCountryCodeInView && showPhoneCodeInView { - countryDetailsLabel.text = "(\(selectedCountry.code)) \(selectedCountry.phoneCode)" + countryDetailsLabel.text = "(\(selectedCountry.code)) \u{202A}\(selectedCountry.phoneCode)\u{202C}" } else if showCountryNameInView && showPhoneCodeInView { - countryDetailsLabel.text = "(\(selectedCountry.localizedName() ?? selectedCountry.name)) \(selectedCountry.phoneCode)" + countryDetailsLabel.text = "(\(selectedCountry.localizedName() ?? selectedCountry.name)) \u{202A}\(selectedCountry.phoneCode)\u{202C}" } else if showCountryCodeInView || showPhoneCodeInView || showCountryNameInView { countryDetailsLabel.text = showCountryCodeInView ? selectedCountry.code : showPhoneCodeInView ? selectedCountry.phoneCode diff --git a/CountryPickerView/CountryPickerViewController.swift b/CountryPickerView/CountryPickerViewController.swift index 10389d2..54a21e2 100644 --- a/CountryPickerView/CountryPickerViewController.swift +++ b/CountryPickerView/CountryPickerViewController.swift @@ -134,7 +134,7 @@ extension CountryPickerViewController { name = "\(name) (\(country.code))" } if dataSource.showPhoneCodeInList { - name = "\(name) (\(country.phoneCode))" + name = "\(name) (\u{202A}\(country.phoneCode)\u{202C})" } cell.imageView?.image = country.flag diff --git a/CountryPickerViewDemo/CountryPickerViewDemo.xcodeproj/project.pbxproj b/CountryPickerViewDemo/CountryPickerViewDemo.xcodeproj/project.pbxproj index 6f037e1..32877de 100644 --- a/CountryPickerViewDemo/CountryPickerViewDemo.xcodeproj/project.pbxproj +++ b/CountryPickerViewDemo/CountryPickerViewDemo.xcodeproj/project.pbxproj @@ -36,6 +36,8 @@ 004CA3091F705DD600B690B8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 004CA30C1F705DD600B690B8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 004CA30E1F705DD600B690B8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 15254F7525F0032A000C5668 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main.strings; sourceTree = ""; }; + 15254F7625F0032B000C5668 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LaunchScreen.strings; sourceTree = ""; }; 459706724723319B379BF2E4 /* Pods-CountryPickerViewDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CountryPickerViewDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CountryPickerViewDemo/Pods-CountryPickerViewDemo.debug.xcconfig"; sourceTree = ""; }; 476008F23554AD41FFB937C1 /* Pods-CountryPickerViewDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CountryPickerViewDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-CountryPickerViewDemo/Pods-CountryPickerViewDemo.release.xcconfig"; sourceTree = ""; }; 9B8C8BC3DAF9C411DCD8D1C9 /* Pods_CountryPickerViewDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CountryPickerViewDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -149,6 +151,7 @@ English, en, Base, + ar, ); mainGroup = 004CA2F61F705DD600B690B8; productRefGroup = 004CA3001F705DD600B690B8 /* Products */; @@ -229,6 +232,7 @@ isa = PBXVariantGroup; children = ( 004CA3071F705DD600B690B8 /* Base */, + 15254F7525F0032A000C5668 /* ar */, ); name = Main.storyboard; sourceTree = ""; @@ -237,6 +241,7 @@ isa = PBXVariantGroup; children = ( 004CA30C1F705DD600B690B8 /* Base */, + 15254F7625F0032B000C5668 /* ar */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -365,7 +370,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = K3JWY7DT4K; INFOPLIST_FILE = CountryPickerViewDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.kizitonwose.CountryPickerViewDemo; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -381,7 +386,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = K3JWY7DT4K; INFOPLIST_FILE = CountryPickerViewDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.kizitonwose.CountryPickerViewDemo; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/CountryPickerViewDemo/CountryPickerViewDemo/ar.lproj/LaunchScreen.strings b/CountryPickerViewDemo/CountryPickerViewDemo/ar.lproj/LaunchScreen.strings new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/CountryPickerViewDemo/CountryPickerViewDemo/ar.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/CountryPickerViewDemo/CountryPickerViewDemo/ar.lproj/Main.strings b/CountryPickerViewDemo/CountryPickerViewDemo/ar.lproj/Main.strings new file mode 100644 index 0000000..45d6a78 --- /dev/null +++ b/CountryPickerViewDemo/CountryPickerViewDemo/ar.lproj/Main.strings @@ -0,0 +1,63 @@ + +/* Class = "UILabel"; text = "CountryPickerView can also be used as an independent view."; ObjectID = "1RQ-vo-NB4"; */ +"1RQ-vo-NB4.text" = "CountryPickerView can also be used as an independent view."; + +/* Class = "UILabel"; text = "Show phone code in list"; ObjectID = "1UF-QN-m72"; */ +"1UF-QN-m72.text" = "Show phone code in list"; + +/* Class = "UITableViewSection"; headerTitle = "CUSTOMIZATION"; ObjectID = "40Z-Ay-ZrI"; */ +"40Z-Ay-ZrI.headerTitle" = "CUSTOMIZATION"; + +/* Class = "UILabel"; text = "The internal Country Picker can be used independently."; ObjectID = "8So-g0-xNg"; */ +"8So-g0-xNg.text" = "The internal Country Picker can be used independently."; + +/* Class = "UILabel"; text = "Show ONLY preferred countries section"; ObjectID = "8aM-7z-xIV"; */ +"8aM-7z-xIV.text" = "Show ONLY preferred countries section"; + +/* Class = "UIButton"; normalTitle = "Select a Country"; ObjectID = "Cvr-s2-9T2"; */ +"Cvr-s2-9T2.normalTitle" = "Select a Country"; + +/* Class = "UILabel"; text = "Show country code in list"; ObjectID = "EF5-yw-4gn"; */ +"EF5-yw-4gn.text" = "Show country code in list"; + +/* Class = "UILabel"; text = "Show phone code in view"; ObjectID = "Fga-9R-GVt"; */ +"Fga-9R-GVt.text" = "Show phone code in view"; + +/* Class = "UILabel"; text = "CountryPickerView can be used as the left view of a phone number input text field"; ObjectID = "H3z-cJ-GdF"; */ +"H3z-cJ-GdF.text" = "CountryPickerView can be used as the left view of a phone number input text field"; + +/* Class = "UISegmentedControl"; Jr1-AD-yBk.segmentTitles[0] = "Table View"; ObjectID = "Jr1-AD-yBk"; */ +"Jr1-AD-yBk.segmentTitles[0]" = "Table View"; + +/* Class = "UISegmentedControl"; Jr1-AD-yBk.segmentTitles[1] = "Navigation Bar"; ObjectID = "Jr1-AD-yBk"; */ +"Jr1-AD-yBk.segmentTitles[1]" = "Navigation Bar"; + +/* Class = "UISegmentedControl"; Jr1-AD-yBk.segmentTitles[2] = "Hidden"; ObjectID = "Jr1-AD-yBk"; */ +"Jr1-AD-yBk.segmentTitles[2]" = "Hidden"; + +/* Class = "UINavigationItem"; title = "CountryPickerView Demo"; ObjectID = "L8o-xe-Pfv"; */ +"L8o-xe-Pfv.title" = "CountryPickerView Demo"; + +/* Class = "UISegmentedControl"; SCL-Cv-BjI.segmentTitles[0] = "Push"; ObjectID = "SCL-Cv-BjI"; */ +"SCL-Cv-BjI.segmentTitles[0]" = "Push"; + +/* Class = "UISegmentedControl"; SCL-Cv-BjI.segmentTitles[1] = "Present"; ObjectID = "SCL-Cv-BjI"; */ +"SCL-Cv-BjI.segmentTitles[1]" = "Present"; + +/* Class = "UITableViewSection"; headerTitle = "USAGE"; ObjectID = "VxW-EB-0C6"; */ +"VxW-EB-0C6.headerTitle" = "USAGE"; + +/* Class = "UILabel"; text = "Click on the view to open picker"; ObjectID = "cVo-xn-9I4"; */ +"cVo-xn-9I4.text" = "Click on the view to open picker"; + +/* Class = "UILabel"; text = "SEARCH BAR POSITION"; ObjectID = "g5B-s5-Vai"; */ +"g5B-s5-Vai.text" = "SEARCH BAR POSITION"; + +/* Class = "UILabel"; text = "Show country code in view"; ObjectID = "geW-Qh-IPW"; */ +"geW-Qh-IPW.text" = "Show country code in view"; + +/* Class = "UILabel"; text = "Show preferred countries section"; ObjectID = "u3m-oh-NBx"; */ +"u3m-oh-NBx.text" = "Show preferred countries section"; + +/* Class = "UILabel"; text = "Show country name in view"; ObjectID = "zDT-4c-h2J"; */ +"zDT-4c-h2J.text" = "Show country name in view"; diff --git a/CountryPickerViewDemo/Podfile b/CountryPickerViewDemo/Podfile index 40c61f2..e4bfd5a 100644 --- a/CountryPickerViewDemo/Podfile +++ b/CountryPickerViewDemo/Podfile @@ -1,4 +1,4 @@ -platform :ios, '8.0' +platform :ios, '9.0' target 'CountryPickerViewDemo' do use_frameworks! diff --git a/CountryPickerViewDemo/Podfile.lock b/CountryPickerViewDemo/Podfile.lock index 6dc7b12..c8c4f83 100644 --- a/CountryPickerViewDemo/Podfile.lock +++ b/CountryPickerViewDemo/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - CountryPickerView (3.1.0) + - CountryPickerView (3.2.0) DEPENDENCIES: - CountryPickerView (from `../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - CountryPickerView: ab341e2253d5e1231ff679ec93441e413703cb9c + CountryPickerView: 9b093bfffb4b06a69ba6185a798cadbf863720e7 -PODFILE CHECKSUM: 649829ad9a32abd953e33364dc48a4a40a615047 +PODFILE CHECKSUM: 1cd5c4aa4d0640ed508d2a66a00ff43232db9ee3 -COCOAPODS: 1.8.4 +COCOAPODS: 1.9.3 diff --git a/Package.swift b/Package.swift index da46a8e..2c410c1 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.3 import PackageDescription let package = Package(