From 5f578d3bc52e7eaf958abbcb43750428116941b4 Mon Sep 17 00:00:00 2001 From: Zeno Foltin Date: Wed, 3 Mar 2021 17:43:17 +0000 Subject: [PATCH 1/4] Update Tokelau's flag --- .../CountryPickerView.bundle/Images/TK.png | Bin 1562 -> 1493 bytes 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 CountryPickerView/Assets/CountryPickerView.bundle/Images/TK.png 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 3f2c0541b9a563799686c5e9dbbd259eb8a5f476..dda0f4d6d00348dc8f125f908f1bf3ff440950f4 GIT binary patch delta 1486 zcmV;<1u^=X4Al#e8Gix*007ay%ZdO11)NDlK~#7Fot6V|EK3xIPk8OUv6DrtYumQ7 z%+Ah+&$eybw(Z!?wQY0X-_v#Hy`9>Ls{Wel+3KCI&*}f1Zt{wDC`3_?zBRPG_lxR8Vu4%&|0l zHiCi4snN9uX5og~Lz8oV_^H@vyN}2?(BPyFZ)!iSBQ^=t+}mo<2or zKh^C2kphF!8h;8Euntgr#EETFnI|G0q45GDL#*#Tw7^wIu131r!om$U2yK~*B+2Z+ z1Sgz@m4e+zD}t?NPH%}C0V@TI!2JH&G#~*!@^{p*5!n#JJHzA^gFyPBRCsI$b?vv53X1Y+-%hf>Jen=-01Aq0HqXI^tz6g#i5C-y&f=z+; zq>+VX6%8;skqOpQW;mQ%$r+ns-~3$$s28hxUaabdpc_6NjkHH43Zw=`C~)$kmA69} z$UEwXMT814+V?*eEm(dl2P>#B4yY5x+4lUJ;A)}^mAzaw1Te-`AB+b$CP^I}o{~ef z2w_1O;D1$44&P%G6@}O_P-K{w&4QVhLx05}L}VCL8C?D0xOTv(RHBtHzVaD_0bUhF z!i=WOFmDk#s}`7#6@^RGo)VRV{qall=OdAf$OLsT)~<}ZoIZ&?-ZdaVjHjJEO$Jh@3 z87sTVqb^pnihBOGWyno*qR@3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a0d8270565c071eb215040cfe Mon Sep 17 00:00:00 2001 From: Zeno Foltin Date: Wed, 3 Mar 2021 18:39:52 +0000 Subject: [PATCH 2/4] Improve RTL support --- CountryPickerView/CountryPickerView.swift | 4 +- .../CountryPickerViewController.swift | 2 +- .../project.pbxproj | 5 ++ .../ar.lproj/LaunchScreen.strings | 1 + .../ar.lproj/Main.strings | 63 +++++++++++++++++++ 5 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 CountryPickerViewDemo/CountryPickerViewDemo/ar.lproj/LaunchScreen.strings create mode 100644 CountryPickerViewDemo/CountryPickerViewDemo/ar.lproj/Main.strings 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..96606c0 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 = ""; 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"; From 8aff99ffd98f62ebacc952e7ae412cd55a6c23c6 Mon Sep 17 00:00:00 2001 From: Kizito Nwose Date: Sat, 27 Mar 2021 07:49:45 +0100 Subject: [PATCH 3/4] Update deployment target to 9.0 --- CountryPickerView.podspec | 4 ++-- .../CountryPickerViewDemo.xcodeproj/project.pbxproj | 4 ++-- CountryPickerViewDemo/Podfile | 2 +- CountryPickerViewDemo/Podfile.lock | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) 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/CountryPickerViewDemo/CountryPickerViewDemo.xcodeproj/project.pbxproj b/CountryPickerViewDemo/CountryPickerViewDemo.xcodeproj/project.pbxproj index 96606c0..32877de 100644 --- a/CountryPickerViewDemo/CountryPickerViewDemo.xcodeproj/project.pbxproj +++ b/CountryPickerViewDemo/CountryPickerViewDemo.xcodeproj/project.pbxproj @@ -370,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)"; @@ -386,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/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 From f4f38bd73a9c1bce46ca09eeb9e0f80753597959 Mon Sep 17 00:00:00 2001 From: Kizito Nwose Date: Sat, 27 Mar 2021 08:07:33 +0100 Subject: [PATCH 4/4] Fix #130 --- .../Assets/CountryPickerView.bundle/Data/CountryCodes.json | 2 +- Package.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/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(