├── .gitignore ├── .swift-version ├── .travis.yml ├── Cartfile.private ├── Cartfile.resolved ├── Example ├── Example.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Example.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Example │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Extensions │ │ └── Flag+Extension.swift │ ├── Info.plist │ └── ListFlags │ │ ├── ListFlagCell.swift │ │ ├── ListFlagSectionController.swift │ │ ├── ListFlagsModel.swift │ │ ├── ListFlagsReactor.swift │ │ └── ListFlagsViewController.swift ├── ExampleTests │ ├── Flag+ExtensionSpec.swift │ ├── Info.plist │ └── ListFlags │ │ ├── ListFlagsReactorSpec.swift │ │ └── ListFlagsViewControllerSpec.swift ├── ExampleUITests │ ├── Info.plist │ ├── ListFlags │ │ └── ListFlagUITests.swift │ └── UITestCase.swift ├── Podfile ├── Podfile.lock └── README.md ├── Flags.podspec ├── Flags.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── Flags.xcscheme ├── Flags ├── Flags.h ├── Info.plist └── Sources │ ├── Flag+Country.swift │ ├── Flag+Emoji.swift │ ├── Flag+UIImage.swift │ └── Flag.swift ├── FlagsTests ├── FlagSpec.swift └── Info.plist ├── LICENSE ├── README.md ├── README └── flags.gif └── codecov.yml /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | # Package.resolved 41 | .build/ 42 | 43 | # CocoaPods 44 | # 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # 49 | Pods/ 50 | 51 | # Carthage 52 | # 53 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 54 | Carthage/Checkouts 55 | 56 | Carthage/Build 57 | 58 | # fastlane 59 | # 60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 61 | # screenshots whenever they are needed. 62 | # For more information about the recommended setup visit: 63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 64 | 65 | fastlane/report.xml 66 | fastlane/Preview.html 67 | fastlane/screenshots/**/*.png 68 | fastlane/test_output 69 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.2 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode10 2 | language: objective-c 3 | xcode-project: Flags.xcworkspace 4 | xcode_scheme: Flags 5 | xcode_sdk: iphonesimulator12 6 | branches: 7 | only: 8 | - master 9 | - develop 10 | - /^v[\d.]+$/ 11 | except: 12 | - screenshot 13 | 14 | env: 15 | global: 16 | - PROJECT="Flags.xcodeproj" 17 | - SCHEME="Flags" 18 | - IOS_SDK="iphonesimulator12.0" 19 | - FRAMEWORK="Flags" 20 | matrix: 21 | - SDK="$IOS_SDK" DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=12.0" 22 | 23 | before_script: 24 | - set -o pipefail 25 | - carthage update --cache-builds --platform iOS 26 | 27 | script: 28 | - pod lib lint 29 | - xcodebuild clean build test 30 | -project "$PROJECT" 31 | -scheme "$SCHEME" 32 | -sdk "$SDK" 33 | -destination "$DESTINATION" 34 | -configuration Debug 35 | -enableCodeCoverage YES 36 | CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c 37 | after_success: 38 | - bash <(curl -s https://codecov.io/bash) -X xcodeplist -J 'Flags'; 39 | -------------------------------------------------------------------------------- /Cartfile.private: -------------------------------------------------------------------------------- 1 | github "Quick/Quick" ~> 1.3.2 2 | github "Quick/Nimble" ~> 7.3.1 3 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "Quick/Nimble" "v7.3.1" 2 | github "Quick/Quick" "v1.3.2" 3 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 008D39717127E073DA2DEBDC /* Pods_Example_ExampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9ACB3946CE3483C359557705 /* Pods_Example_ExampleTests.framework */; }; 11 | DD762FF552480F53E426CCDE /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24AC9DC9118242D091E1B53A /* Pods_Example.framework */; }; 12 | FCB0AEA1219877F900AA58B7 /* ListFlagsReactorSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCB0AEA0219877F900AA58B7 /* ListFlagsReactorSpec.swift */; }; 13 | FCB0AEA42198845700AA58B7 /* Flag+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCB0AEA32198845700AA58B7 /* Flag+Extension.swift */; }; 14 | FCB0AEA6219885A500AA58B7 /* Flag+ExtensionSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCB0AEA5219885A500AA58B7 /* Flag+ExtensionSpec.swift */; }; 15 | FCD8FACF218EEFA400E20544 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD8FACE218EEFA400E20544 /* AppDelegate.swift */; }; 16 | FCD8FAD4218EEFA400E20544 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FCD8FAD2218EEFA400E20544 /* Main.storyboard */; }; 17 | FCD8FAD6218EEFA500E20544 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FCD8FAD5218EEFA500E20544 /* Assets.xcassets */; }; 18 | FCD8FAD9218EEFA500E20544 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FCD8FAD7218EEFA500E20544 /* LaunchScreen.storyboard */; }; 19 | FCD8FAFD218EF13B00E20544 /* UITestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD8FAFC218EF13B00E20544 /* UITestCase.swift */; }; 20 | FCD8FB00218EF18D00E20544 /* ListFlagUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD8FAFF218EF18D00E20544 /* ListFlagUITests.swift */; }; 21 | FCD8FB03218EF2DC00E20544 /* ListFlagsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD8FB02218EF2DC00E20544 /* ListFlagsViewController.swift */; }; 22 | FCD8FB06218EF7A800E20544 /* ListFlagsViewControllerSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD8FB05218EF7A800E20544 /* ListFlagsViewControllerSpec.swift */; }; 23 | FCD8FB08218EFC6E00E20544 /* ListFlagCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD8FB07218EFC6E00E20544 /* ListFlagCell.swift */; }; 24 | FCD8FB0A218EFE3F00E20544 /* ListFlagsReactor.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD8FB09218EFE3F00E20544 /* ListFlagsReactor.swift */; }; 25 | FCD8FB0E218F060600E20544 /* ListFlagSectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD8FB0D218F060600E20544 /* ListFlagSectionController.swift */; }; 26 | FCD8FB10218F07C900E20544 /* ListFlagsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD8FB0F218F07C900E20544 /* ListFlagsModel.swift */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | FCD8FAE0218EEFA500E20544 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = FCD8FAC3218EEFA400E20544 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = FCD8FACA218EEFA400E20544; 35 | remoteInfo = Example; 36 | }; 37 | FCD8FAEB218EEFA500E20544 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = FCD8FAC3218EEFA400E20544 /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = FCD8FACA218EEFA400E20544; 42 | remoteInfo = Example; 43 | }; 44 | /* End PBXContainerItemProxy section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 04934E02639DBA42541937F7 /* Pods-Example-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.debug.xcconfig"; sourceTree = ""; }; 48 | 13F258F0A294ED06E54DA4B9 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; 49 | 24AC9DC9118242D091E1B53A /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 4F62B655BA5FF30DB80894B2 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; 51 | 9ACB3946CE3483C359557705 /* Pods_Example_ExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example_ExampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | A126ED3453A836FEE9039D6D /* Pods-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-ExampleTests/Pods-ExampleTests.release.xcconfig"; sourceTree = ""; }; 53 | AE9AF04CB17E5A9DFD7C7338 /* Pods-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-ExampleTests/Pods-ExampleTests.debug.xcconfig"; sourceTree = ""; }; 54 | C788D41B3D0FC22B1C55EE61 /* Pods-Example-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.release.xcconfig"; sourceTree = ""; }; 55 | FCB0AEA0219877F900AA58B7 /* ListFlagsReactorSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFlagsReactorSpec.swift; sourceTree = ""; }; 56 | FCB0AEA32198845700AA58B7 /* Flag+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Flag+Extension.swift"; sourceTree = ""; }; 57 | FCB0AEA5219885A500AA58B7 /* Flag+ExtensionSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Flag+ExtensionSpec.swift"; sourceTree = ""; }; 58 | FCD8FACB218EEFA400E20544 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | FCD8FACE218EEFA400E20544 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 60 | FCD8FAD3218EEFA400E20544 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 61 | FCD8FAD5218EEFA500E20544 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 62 | FCD8FAD8218EEFA500E20544 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 63 | FCD8FADA218EEFA500E20544 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | FCD8FADF218EEFA500E20544 /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | FCD8FAE5218EEFA500E20544 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | FCD8FAEA218EEFA500E20544 /* ExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | FCD8FAF0218EEFA500E20544 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 68 | FCD8FAFC218EF13B00E20544 /* UITestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITestCase.swift; sourceTree = ""; }; 69 | FCD8FAFF218EF18D00E20544 /* ListFlagUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFlagUITests.swift; sourceTree = ""; }; 70 | FCD8FB02218EF2DC00E20544 /* ListFlagsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFlagsViewController.swift; sourceTree = ""; }; 71 | FCD8FB05218EF7A800E20544 /* ListFlagsViewControllerSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFlagsViewControllerSpec.swift; sourceTree = ""; }; 72 | FCD8FB07218EFC6E00E20544 /* ListFlagCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFlagCell.swift; sourceTree = ""; }; 73 | FCD8FB09218EFE3F00E20544 /* ListFlagsReactor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFlagsReactor.swift; sourceTree = ""; }; 74 | FCD8FB0D218F060600E20544 /* ListFlagSectionController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFlagSectionController.swift; sourceTree = ""; }; 75 | FCD8FB0F218F07C900E20544 /* ListFlagsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFlagsModel.swift; sourceTree = ""; }; 76 | /* End PBXFileReference section */ 77 | 78 | /* Begin PBXFrameworksBuildPhase section */ 79 | FCD8FAC8218EEFA400E20544 /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | DD762FF552480F53E426CCDE /* Pods_Example.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | FCD8FADC218EEFA500E20544 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | 008D39717127E073DA2DEBDC /* Pods_Example_ExampleTests.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | FCD8FAE7218EEFA500E20544 /* Frameworks */ = { 96 | isa = PBXFrameworksBuildPhase; 97 | buildActionMask = 2147483647; 98 | files = ( 99 | ); 100 | runOnlyForDeploymentPostprocessing = 0; 101 | }; 102 | /* End PBXFrameworksBuildPhase section */ 103 | 104 | /* Begin PBXGroup section */ 105 | 566892E210433A8721F540E4 /* Pods */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 4F62B655BA5FF30DB80894B2 /* Pods-Example.debug.xcconfig */, 109 | 13F258F0A294ED06E54DA4B9 /* Pods-Example.release.xcconfig */, 110 | AE9AF04CB17E5A9DFD7C7338 /* Pods-ExampleTests.debug.xcconfig */, 111 | A126ED3453A836FEE9039D6D /* Pods-ExampleTests.release.xcconfig */, 112 | 04934E02639DBA42541937F7 /* Pods-Example-ExampleTests.debug.xcconfig */, 113 | C788D41B3D0FC22B1C55EE61 /* Pods-Example-ExampleTests.release.xcconfig */, 114 | ); 115 | path = Pods; 116 | sourceTree = ""; 117 | }; 118 | D7388FF963E8C066E768AA83 /* Frameworks */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 24AC9DC9118242D091E1B53A /* Pods_Example.framework */, 122 | 9ACB3946CE3483C359557705 /* Pods_Example_ExampleTests.framework */, 123 | ); 124 | name = Frameworks; 125 | sourceTree = ""; 126 | }; 127 | FCB0AEA22198844600AA58B7 /* Extensions */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | FCB0AEA32198845700AA58B7 /* Flag+Extension.swift */, 131 | ); 132 | path = Extensions; 133 | sourceTree = ""; 134 | }; 135 | FCD8FAC2218EEFA400E20544 = { 136 | isa = PBXGroup; 137 | children = ( 138 | FCD8FACD218EEFA400E20544 /* Example */, 139 | FCD8FAE2218EEFA500E20544 /* ExampleTests */, 140 | FCD8FAED218EEFA500E20544 /* ExampleUITests */, 141 | FCD8FACC218EEFA400E20544 /* Products */, 142 | 566892E210433A8721F540E4 /* Pods */, 143 | D7388FF963E8C066E768AA83 /* Frameworks */, 144 | ); 145 | sourceTree = ""; 146 | }; 147 | FCD8FACC218EEFA400E20544 /* Products */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | FCD8FACB218EEFA400E20544 /* Example.app */, 151 | FCD8FADF218EEFA500E20544 /* ExampleTests.xctest */, 152 | FCD8FAEA218EEFA500E20544 /* ExampleUITests.xctest */, 153 | ); 154 | name = Products; 155 | sourceTree = ""; 156 | }; 157 | FCD8FACD218EEFA400E20544 /* Example */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | FCD8FACE218EEFA400E20544 /* AppDelegate.swift */, 161 | FCB0AEA22198844600AA58B7 /* Extensions */, 162 | FCD8FB01218EF2C000E20544 /* ListFlags */, 163 | FCD8FAD2218EEFA400E20544 /* Main.storyboard */, 164 | FCD8FAD5218EEFA500E20544 /* Assets.xcassets */, 165 | FCD8FAD7218EEFA500E20544 /* LaunchScreen.storyboard */, 166 | FCD8FADA218EEFA500E20544 /* Info.plist */, 167 | ); 168 | path = Example; 169 | sourceTree = ""; 170 | }; 171 | FCD8FAE2218EEFA500E20544 /* ExampleTests */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | FCD8FB04218EF78300E20544 /* ListFlags */, 175 | FCD8FAE5218EEFA500E20544 /* Info.plist */, 176 | FCB0AEA5219885A500AA58B7 /* Flag+ExtensionSpec.swift */, 177 | ); 178 | path = ExampleTests; 179 | sourceTree = ""; 180 | }; 181 | FCD8FAED218EEFA500E20544 /* ExampleUITests */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | FCD8FAFE218EF16500E20544 /* ListFlags */, 185 | FCD8FAF0218EEFA500E20544 /* Info.plist */, 186 | FCD8FAFC218EF13B00E20544 /* UITestCase.swift */, 187 | ); 188 | path = ExampleUITests; 189 | sourceTree = ""; 190 | }; 191 | FCD8FAFE218EF16500E20544 /* ListFlags */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | FCD8FAFF218EF18D00E20544 /* ListFlagUITests.swift */, 195 | ); 196 | path = ListFlags; 197 | sourceTree = ""; 198 | }; 199 | FCD8FB01218EF2C000E20544 /* ListFlags */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | FCD8FB02218EF2DC00E20544 /* ListFlagsViewController.swift */, 203 | FCD8FB07218EFC6E00E20544 /* ListFlagCell.swift */, 204 | FCD8FB09218EFE3F00E20544 /* ListFlagsReactor.swift */, 205 | FCD8FB0D218F060600E20544 /* ListFlagSectionController.swift */, 206 | FCD8FB0F218F07C900E20544 /* ListFlagsModel.swift */, 207 | ); 208 | path = ListFlags; 209 | sourceTree = ""; 210 | }; 211 | FCD8FB04218EF78300E20544 /* ListFlags */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | FCD8FB05218EF7A800E20544 /* ListFlagsViewControllerSpec.swift */, 215 | FCB0AEA0219877F900AA58B7 /* ListFlagsReactorSpec.swift */, 216 | ); 217 | path = ListFlags; 218 | sourceTree = ""; 219 | }; 220 | /* End PBXGroup section */ 221 | 222 | /* Begin PBXNativeTarget section */ 223 | FCD8FACA218EEFA400E20544 /* Example */ = { 224 | isa = PBXNativeTarget; 225 | buildConfigurationList = FCD8FAF3218EEFA500E20544 /* Build configuration list for PBXNativeTarget "Example" */; 226 | buildPhases = ( 227 | D68A0D4A1863A5BE2DDB2AB8 /* [CP] Check Pods Manifest.lock */, 228 | FCD8FAC7218EEFA400E20544 /* Sources */, 229 | FCD8FAC8218EEFA400E20544 /* Frameworks */, 230 | FCD8FAC9218EEFA400E20544 /* Resources */, 231 | EA6DE7EA4B08243A28005E1D /* [CP] Embed Pods Frameworks */, 232 | ); 233 | buildRules = ( 234 | ); 235 | dependencies = ( 236 | ); 237 | name = Example; 238 | productName = Example; 239 | productReference = FCD8FACB218EEFA400E20544 /* Example.app */; 240 | productType = "com.apple.product-type.application"; 241 | }; 242 | FCD8FADE218EEFA500E20544 /* ExampleTests */ = { 243 | isa = PBXNativeTarget; 244 | buildConfigurationList = FCD8FAF6218EEFA500E20544 /* Build configuration list for PBXNativeTarget "ExampleTests" */; 245 | buildPhases = ( 246 | 92D99BEEAFC58EA31251E19A /* [CP] Check Pods Manifest.lock */, 247 | FCD8FADB218EEFA500E20544 /* Sources */, 248 | FCD8FADC218EEFA500E20544 /* Frameworks */, 249 | FCD8FADD218EEFA500E20544 /* Resources */, 250 | E8C5ECCD89EA1A6DBF57B6E7 /* [CP] Embed Pods Frameworks */, 251 | ); 252 | buildRules = ( 253 | ); 254 | dependencies = ( 255 | FCD8FAE1218EEFA500E20544 /* PBXTargetDependency */, 256 | ); 257 | name = ExampleTests; 258 | productName = ExampleTests; 259 | productReference = FCD8FADF218EEFA500E20544 /* ExampleTests.xctest */; 260 | productType = "com.apple.product-type.bundle.unit-test"; 261 | }; 262 | FCD8FAE9218EEFA500E20544 /* ExampleUITests */ = { 263 | isa = PBXNativeTarget; 264 | buildConfigurationList = FCD8FAF9218EEFA500E20544 /* Build configuration list for PBXNativeTarget "ExampleUITests" */; 265 | buildPhases = ( 266 | FCD8FAE6218EEFA500E20544 /* Sources */, 267 | FCD8FAE7218EEFA500E20544 /* Frameworks */, 268 | FCD8FAE8218EEFA500E20544 /* Resources */, 269 | ); 270 | buildRules = ( 271 | ); 272 | dependencies = ( 273 | FCD8FAEC218EEFA500E20544 /* PBXTargetDependency */, 274 | ); 275 | name = ExampleUITests; 276 | productName = ExampleUITests; 277 | productReference = FCD8FAEA218EEFA500E20544 /* ExampleUITests.xctest */; 278 | productType = "com.apple.product-type.bundle.ui-testing"; 279 | }; 280 | /* End PBXNativeTarget section */ 281 | 282 | /* Begin PBXProject section */ 283 | FCD8FAC3218EEFA400E20544 /* Project object */ = { 284 | isa = PBXProject; 285 | attributes = { 286 | LastSwiftUpdateCheck = 1000; 287 | LastUpgradeCheck = 1000; 288 | ORGANIZATIONNAME = Cruz; 289 | TargetAttributes = { 290 | FCD8FACA218EEFA400E20544 = { 291 | CreatedOnToolsVersion = 10.0; 292 | }; 293 | FCD8FADE218EEFA500E20544 = { 294 | CreatedOnToolsVersion = 10.0; 295 | LastSwiftMigration = 1000; 296 | TestTargetID = FCD8FACA218EEFA400E20544; 297 | }; 298 | FCD8FAE9218EEFA500E20544 = { 299 | CreatedOnToolsVersion = 10.0; 300 | TestTargetID = FCD8FACA218EEFA400E20544; 301 | }; 302 | }; 303 | }; 304 | buildConfigurationList = FCD8FAC6218EEFA400E20544 /* Build configuration list for PBXProject "Example" */; 305 | compatibilityVersion = "Xcode 10.0"; 306 | developmentRegion = en; 307 | hasScannedForEncodings = 0; 308 | knownRegions = ( 309 | en, 310 | Base, 311 | ); 312 | mainGroup = FCD8FAC2218EEFA400E20544; 313 | productRefGroup = FCD8FACC218EEFA400E20544 /* Products */; 314 | projectDirPath = ""; 315 | projectRoot = ""; 316 | targets = ( 317 | FCD8FACA218EEFA400E20544 /* Example */, 318 | FCD8FADE218EEFA500E20544 /* ExampleTests */, 319 | FCD8FAE9218EEFA500E20544 /* ExampleUITests */, 320 | ); 321 | }; 322 | /* End PBXProject section */ 323 | 324 | /* Begin PBXResourcesBuildPhase section */ 325 | FCD8FAC9218EEFA400E20544 /* Resources */ = { 326 | isa = PBXResourcesBuildPhase; 327 | buildActionMask = 2147483647; 328 | files = ( 329 | FCD8FAD9218EEFA500E20544 /* LaunchScreen.storyboard in Resources */, 330 | FCD8FAD6218EEFA500E20544 /* Assets.xcassets in Resources */, 331 | FCD8FAD4218EEFA400E20544 /* Main.storyboard in Resources */, 332 | ); 333 | runOnlyForDeploymentPostprocessing = 0; 334 | }; 335 | FCD8FADD218EEFA500E20544 /* Resources */ = { 336 | isa = PBXResourcesBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | }; 342 | FCD8FAE8218EEFA500E20544 /* Resources */ = { 343 | isa = PBXResourcesBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | ); 347 | runOnlyForDeploymentPostprocessing = 0; 348 | }; 349 | /* End PBXResourcesBuildPhase section */ 350 | 351 | /* Begin PBXShellScriptBuildPhase section */ 352 | 92D99BEEAFC58EA31251E19A /* [CP] Check Pods Manifest.lock */ = { 353 | isa = PBXShellScriptBuildPhase; 354 | buildActionMask = 2147483647; 355 | files = ( 356 | ); 357 | inputFileListPaths = ( 358 | ); 359 | inputPaths = ( 360 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 361 | "${PODS_ROOT}/Manifest.lock", 362 | ); 363 | name = "[CP] Check Pods Manifest.lock"; 364 | outputFileListPaths = ( 365 | ); 366 | outputPaths = ( 367 | "$(DERIVED_FILE_DIR)/Pods-Example-ExampleTests-checkManifestLockResult.txt", 368 | ); 369 | runOnlyForDeploymentPostprocessing = 0; 370 | shellPath = /bin/sh; 371 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 372 | showEnvVarsInLog = 0; 373 | }; 374 | D68A0D4A1863A5BE2DDB2AB8 /* [CP] Check Pods Manifest.lock */ = { 375 | isa = PBXShellScriptBuildPhase; 376 | buildActionMask = 2147483647; 377 | files = ( 378 | ); 379 | inputFileListPaths = ( 380 | ); 381 | inputPaths = ( 382 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 383 | "${PODS_ROOT}/Manifest.lock", 384 | ); 385 | name = "[CP] Check Pods Manifest.lock"; 386 | outputFileListPaths = ( 387 | ); 388 | outputPaths = ( 389 | "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt", 390 | ); 391 | runOnlyForDeploymentPostprocessing = 0; 392 | shellPath = /bin/sh; 393 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 394 | showEnvVarsInLog = 0; 395 | }; 396 | E8C5ECCD89EA1A6DBF57B6E7 /* [CP] Embed Pods Frameworks */ = { 397 | isa = PBXShellScriptBuildPhase; 398 | buildActionMask = 2147483647; 399 | files = ( 400 | ); 401 | inputFileListPaths = ( 402 | "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", 403 | ); 404 | name = "[CP] Embed Pods Frameworks"; 405 | outputFileListPaths = ( 406 | "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", 407 | ); 408 | runOnlyForDeploymentPostprocessing = 0; 409 | shellPath = /bin/sh; 410 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks.sh\"\n"; 411 | showEnvVarsInLog = 0; 412 | }; 413 | EA6DE7EA4B08243A28005E1D /* [CP] Embed Pods Frameworks */ = { 414 | isa = PBXShellScriptBuildPhase; 415 | buildActionMask = 2147483647; 416 | files = ( 417 | ); 418 | inputFileListPaths = ( 419 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-input-files.xcfilelist", 420 | ); 421 | name = "[CP] Embed Pods Frameworks"; 422 | outputFileListPaths = ( 423 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-output-files.xcfilelist", 424 | ); 425 | runOnlyForDeploymentPostprocessing = 0; 426 | shellPath = /bin/sh; 427 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; 428 | showEnvVarsInLog = 0; 429 | }; 430 | /* End PBXShellScriptBuildPhase section */ 431 | 432 | /* Begin PBXSourcesBuildPhase section */ 433 | FCD8FAC7218EEFA400E20544 /* Sources */ = { 434 | isa = PBXSourcesBuildPhase; 435 | buildActionMask = 2147483647; 436 | files = ( 437 | FCD8FACF218EEFA400E20544 /* AppDelegate.swift in Sources */, 438 | FCD8FB03218EF2DC00E20544 /* ListFlagsViewController.swift in Sources */, 439 | FCD8FB0A218EFE3F00E20544 /* ListFlagsReactor.swift in Sources */, 440 | FCB0AEA42198845700AA58B7 /* Flag+Extension.swift in Sources */, 441 | FCD8FB10218F07C900E20544 /* ListFlagsModel.swift in Sources */, 442 | FCD8FB08218EFC6E00E20544 /* ListFlagCell.swift in Sources */, 443 | FCD8FB0E218F060600E20544 /* ListFlagSectionController.swift in Sources */, 444 | ); 445 | runOnlyForDeploymentPostprocessing = 0; 446 | }; 447 | FCD8FADB218EEFA500E20544 /* Sources */ = { 448 | isa = PBXSourcesBuildPhase; 449 | buildActionMask = 2147483647; 450 | files = ( 451 | FCD8FB06218EF7A800E20544 /* ListFlagsViewControllerSpec.swift in Sources */, 452 | FCB0AEA1219877F900AA58B7 /* ListFlagsReactorSpec.swift in Sources */, 453 | FCB0AEA6219885A500AA58B7 /* Flag+ExtensionSpec.swift in Sources */, 454 | ); 455 | runOnlyForDeploymentPostprocessing = 0; 456 | }; 457 | FCD8FAE6218EEFA500E20544 /* Sources */ = { 458 | isa = PBXSourcesBuildPhase; 459 | buildActionMask = 2147483647; 460 | files = ( 461 | FCD8FAFD218EF13B00E20544 /* UITestCase.swift in Sources */, 462 | FCD8FB00218EF18D00E20544 /* ListFlagUITests.swift in Sources */, 463 | ); 464 | runOnlyForDeploymentPostprocessing = 0; 465 | }; 466 | /* End PBXSourcesBuildPhase section */ 467 | 468 | /* Begin PBXTargetDependency section */ 469 | FCD8FAE1218EEFA500E20544 /* PBXTargetDependency */ = { 470 | isa = PBXTargetDependency; 471 | target = FCD8FACA218EEFA400E20544 /* Example */; 472 | targetProxy = FCD8FAE0218EEFA500E20544 /* PBXContainerItemProxy */; 473 | }; 474 | FCD8FAEC218EEFA500E20544 /* PBXTargetDependency */ = { 475 | isa = PBXTargetDependency; 476 | target = FCD8FACA218EEFA400E20544 /* Example */; 477 | targetProxy = FCD8FAEB218EEFA500E20544 /* PBXContainerItemProxy */; 478 | }; 479 | /* End PBXTargetDependency section */ 480 | 481 | /* Begin PBXVariantGroup section */ 482 | FCD8FAD2218EEFA400E20544 /* Main.storyboard */ = { 483 | isa = PBXVariantGroup; 484 | children = ( 485 | FCD8FAD3218EEFA400E20544 /* Base */, 486 | ); 487 | name = Main.storyboard; 488 | sourceTree = ""; 489 | }; 490 | FCD8FAD7218EEFA500E20544 /* LaunchScreen.storyboard */ = { 491 | isa = PBXVariantGroup; 492 | children = ( 493 | FCD8FAD8218EEFA500E20544 /* Base */, 494 | ); 495 | name = LaunchScreen.storyboard; 496 | sourceTree = ""; 497 | }; 498 | /* End PBXVariantGroup section */ 499 | 500 | /* Begin XCBuildConfiguration section */ 501 | FCD8FAF1218EEFA500E20544 /* Debug */ = { 502 | isa = XCBuildConfiguration; 503 | buildSettings = { 504 | ALWAYS_SEARCH_USER_PATHS = NO; 505 | CLANG_ANALYZER_NONNULL = YES; 506 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 507 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 508 | CLANG_CXX_LIBRARY = "libc++"; 509 | CLANG_ENABLE_MODULES = YES; 510 | CLANG_ENABLE_OBJC_ARC = YES; 511 | CLANG_ENABLE_OBJC_WEAK = YES; 512 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 513 | CLANG_WARN_BOOL_CONVERSION = YES; 514 | CLANG_WARN_COMMA = YES; 515 | CLANG_WARN_CONSTANT_CONVERSION = YES; 516 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 517 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 518 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 519 | CLANG_WARN_EMPTY_BODY = YES; 520 | CLANG_WARN_ENUM_CONVERSION = YES; 521 | CLANG_WARN_INFINITE_RECURSION = YES; 522 | CLANG_WARN_INT_CONVERSION = YES; 523 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 524 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 525 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 526 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 527 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 528 | CLANG_WARN_STRICT_PROTOTYPES = YES; 529 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 530 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 531 | CLANG_WARN_UNREACHABLE_CODE = YES; 532 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 533 | CODE_SIGN_IDENTITY = "iPhone Developer"; 534 | COPY_PHASE_STRIP = NO; 535 | DEBUG_INFORMATION_FORMAT = dwarf; 536 | ENABLE_STRICT_OBJC_MSGSEND = YES; 537 | ENABLE_TESTABILITY = YES; 538 | GCC_C_LANGUAGE_STANDARD = gnu11; 539 | GCC_DYNAMIC_NO_PIC = NO; 540 | GCC_NO_COMMON_BLOCKS = YES; 541 | GCC_OPTIMIZATION_LEVEL = 0; 542 | GCC_PREPROCESSOR_DEFINITIONS = ( 543 | "DEBUG=1", 544 | "$(inherited)", 545 | ); 546 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 547 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 548 | GCC_WARN_UNDECLARED_SELECTOR = YES; 549 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 550 | GCC_WARN_UNUSED_FUNCTION = YES; 551 | GCC_WARN_UNUSED_VARIABLE = YES; 552 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 553 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 554 | MTL_FAST_MATH = YES; 555 | ONLY_ACTIVE_ARCH = YES; 556 | SDKROOT = iphoneos; 557 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 558 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 559 | }; 560 | name = Debug; 561 | }; 562 | FCD8FAF2218EEFA500E20544 /* Release */ = { 563 | isa = XCBuildConfiguration; 564 | buildSettings = { 565 | ALWAYS_SEARCH_USER_PATHS = NO; 566 | CLANG_ANALYZER_NONNULL = YES; 567 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 568 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 569 | CLANG_CXX_LIBRARY = "libc++"; 570 | CLANG_ENABLE_MODULES = YES; 571 | CLANG_ENABLE_OBJC_ARC = YES; 572 | CLANG_ENABLE_OBJC_WEAK = YES; 573 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 574 | CLANG_WARN_BOOL_CONVERSION = YES; 575 | CLANG_WARN_COMMA = YES; 576 | CLANG_WARN_CONSTANT_CONVERSION = YES; 577 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 578 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 579 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 580 | CLANG_WARN_EMPTY_BODY = YES; 581 | CLANG_WARN_ENUM_CONVERSION = YES; 582 | CLANG_WARN_INFINITE_RECURSION = YES; 583 | CLANG_WARN_INT_CONVERSION = YES; 584 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 585 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 586 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 587 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 588 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 589 | CLANG_WARN_STRICT_PROTOTYPES = YES; 590 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 591 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 592 | CLANG_WARN_UNREACHABLE_CODE = YES; 593 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 594 | CODE_SIGN_IDENTITY = "iPhone Developer"; 595 | COPY_PHASE_STRIP = NO; 596 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 597 | ENABLE_NS_ASSERTIONS = NO; 598 | ENABLE_STRICT_OBJC_MSGSEND = YES; 599 | GCC_C_LANGUAGE_STANDARD = gnu11; 600 | GCC_NO_COMMON_BLOCKS = YES; 601 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 602 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 603 | GCC_WARN_UNDECLARED_SELECTOR = YES; 604 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 605 | GCC_WARN_UNUSED_FUNCTION = YES; 606 | GCC_WARN_UNUSED_VARIABLE = YES; 607 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 608 | MTL_ENABLE_DEBUG_INFO = NO; 609 | MTL_FAST_MATH = YES; 610 | SDKROOT = iphoneos; 611 | SWIFT_COMPILATION_MODE = wholemodule; 612 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 613 | VALIDATE_PRODUCT = YES; 614 | }; 615 | name = Release; 616 | }; 617 | FCD8FAF4218EEFA500E20544 /* Debug */ = { 618 | isa = XCBuildConfiguration; 619 | baseConfigurationReference = 4F62B655BA5FF30DB80894B2 /* Pods-Example.debug.xcconfig */; 620 | buildSettings = { 621 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 622 | CODE_SIGN_STYLE = Automatic; 623 | INFOPLIST_FILE = Example/Info.plist; 624 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 625 | LD_RUNPATH_SEARCH_PATHS = ( 626 | "$(inherited)", 627 | "@executable_path/Frameworks", 628 | ); 629 | PRODUCT_BUNDLE_IDENTIFIER = Cruz.Example; 630 | PRODUCT_NAME = "$(TARGET_NAME)"; 631 | SWIFT_VERSION = 4.2; 632 | TARGETED_DEVICE_FAMILY = "1,2"; 633 | }; 634 | name = Debug; 635 | }; 636 | FCD8FAF5218EEFA500E20544 /* Release */ = { 637 | isa = XCBuildConfiguration; 638 | baseConfigurationReference = 13F258F0A294ED06E54DA4B9 /* Pods-Example.release.xcconfig */; 639 | buildSettings = { 640 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 641 | CODE_SIGN_STYLE = Automatic; 642 | INFOPLIST_FILE = Example/Info.plist; 643 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 644 | LD_RUNPATH_SEARCH_PATHS = ( 645 | "$(inherited)", 646 | "@executable_path/Frameworks", 647 | ); 648 | PRODUCT_BUNDLE_IDENTIFIER = Cruz.Example; 649 | PRODUCT_NAME = "$(TARGET_NAME)"; 650 | SWIFT_VERSION = 4.2; 651 | TARGETED_DEVICE_FAMILY = "1,2"; 652 | }; 653 | name = Release; 654 | }; 655 | FCD8FAF7218EEFA500E20544 /* Debug */ = { 656 | isa = XCBuildConfiguration; 657 | baseConfigurationReference = 04934E02639DBA42541937F7 /* Pods-Example-ExampleTests.debug.xcconfig */; 658 | buildSettings = { 659 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 660 | BUNDLE_LOADER = "$(TEST_HOST)"; 661 | CLANG_ENABLE_MODULES = YES; 662 | CODE_SIGN_STYLE = Automatic; 663 | INFOPLIST_FILE = ExampleTests/Info.plist; 664 | LD_RUNPATH_SEARCH_PATHS = ( 665 | "$(inherited)", 666 | "@executable_path/Frameworks", 667 | "@loader_path/Frameworks", 668 | ); 669 | PRODUCT_BUNDLE_IDENTIFIER = Cruz.ExampleTests; 670 | PRODUCT_NAME = "$(TARGET_NAME)"; 671 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 672 | SWIFT_VERSION = 4.2; 673 | TARGETED_DEVICE_FAMILY = "1,2"; 674 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 675 | }; 676 | name = Debug; 677 | }; 678 | FCD8FAF8218EEFA500E20544 /* Release */ = { 679 | isa = XCBuildConfiguration; 680 | baseConfigurationReference = C788D41B3D0FC22B1C55EE61 /* Pods-Example-ExampleTests.release.xcconfig */; 681 | buildSettings = { 682 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 683 | BUNDLE_LOADER = "$(TEST_HOST)"; 684 | CLANG_ENABLE_MODULES = YES; 685 | CODE_SIGN_STYLE = Automatic; 686 | INFOPLIST_FILE = ExampleTests/Info.plist; 687 | LD_RUNPATH_SEARCH_PATHS = ( 688 | "$(inherited)", 689 | "@executable_path/Frameworks", 690 | "@loader_path/Frameworks", 691 | ); 692 | PRODUCT_BUNDLE_IDENTIFIER = Cruz.ExampleTests; 693 | PRODUCT_NAME = "$(TARGET_NAME)"; 694 | SWIFT_VERSION = 4.2; 695 | TARGETED_DEVICE_FAMILY = "1,2"; 696 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 697 | }; 698 | name = Release; 699 | }; 700 | FCD8FAFA218EEFA500E20544 /* Debug */ = { 701 | isa = XCBuildConfiguration; 702 | buildSettings = { 703 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 704 | CODE_SIGN_STYLE = Automatic; 705 | INFOPLIST_FILE = ExampleUITests/Info.plist; 706 | LD_RUNPATH_SEARCH_PATHS = ( 707 | "$(inherited)", 708 | "@executable_path/Frameworks", 709 | "@loader_path/Frameworks", 710 | ); 711 | PRODUCT_BUNDLE_IDENTIFIER = Cruz.ExampleUITests; 712 | PRODUCT_NAME = "$(TARGET_NAME)"; 713 | SWIFT_VERSION = 4.2; 714 | TARGETED_DEVICE_FAMILY = "1,2"; 715 | TEST_TARGET_NAME = Example; 716 | }; 717 | name = Debug; 718 | }; 719 | FCD8FAFB218EEFA500E20544 /* Release */ = { 720 | isa = XCBuildConfiguration; 721 | buildSettings = { 722 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 723 | CODE_SIGN_STYLE = Automatic; 724 | INFOPLIST_FILE = ExampleUITests/Info.plist; 725 | LD_RUNPATH_SEARCH_PATHS = ( 726 | "$(inherited)", 727 | "@executable_path/Frameworks", 728 | "@loader_path/Frameworks", 729 | ); 730 | PRODUCT_BUNDLE_IDENTIFIER = Cruz.ExampleUITests; 731 | PRODUCT_NAME = "$(TARGET_NAME)"; 732 | SWIFT_VERSION = 4.2; 733 | TARGETED_DEVICE_FAMILY = "1,2"; 734 | TEST_TARGET_NAME = Example; 735 | }; 736 | name = Release; 737 | }; 738 | /* End XCBuildConfiguration section */ 739 | 740 | /* Begin XCConfigurationList section */ 741 | FCD8FAC6218EEFA400E20544 /* Build configuration list for PBXProject "Example" */ = { 742 | isa = XCConfigurationList; 743 | buildConfigurations = ( 744 | FCD8FAF1218EEFA500E20544 /* Debug */, 745 | FCD8FAF2218EEFA500E20544 /* Release */, 746 | ); 747 | defaultConfigurationIsVisible = 0; 748 | defaultConfigurationName = Release; 749 | }; 750 | FCD8FAF3218EEFA500E20544 /* Build configuration list for PBXNativeTarget "Example" */ = { 751 | isa = XCConfigurationList; 752 | buildConfigurations = ( 753 | FCD8FAF4218EEFA500E20544 /* Debug */, 754 | FCD8FAF5218EEFA500E20544 /* Release */, 755 | ); 756 | defaultConfigurationIsVisible = 0; 757 | defaultConfigurationName = Release; 758 | }; 759 | FCD8FAF6218EEFA500E20544 /* Build configuration list for PBXNativeTarget "ExampleTests" */ = { 760 | isa = XCConfigurationList; 761 | buildConfigurations = ( 762 | FCD8FAF7218EEFA500E20544 /* Debug */, 763 | FCD8FAF8218EEFA500E20544 /* Release */, 764 | ); 765 | defaultConfigurationIsVisible = 0; 766 | defaultConfigurationName = Release; 767 | }; 768 | FCD8FAF9218EEFA500E20544 /* Build configuration list for PBXNativeTarget "ExampleUITests" */ = { 769 | isa = XCConfigurationList; 770 | buildConfigurations = ( 771 | FCD8FAFA218EEFA500E20544 /* Debug */, 772 | FCD8FAFB218EEFA500E20544 /* Release */, 773 | ); 774 | defaultConfigurationIsVisible = 0; 775 | defaultConfigurationName = Release; 776 | }; 777 | /* End XCConfigurationList section */ 778 | }; 779 | rootObject = FCD8FAC3218EEFA400E20544 /* Project object */; 780 | } 781 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example 4 | // 5 | // Created by Cruz on 04/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Example/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Example/Example/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Example/Example/Extensions/Flag+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Flag+Extension.swift 3 | // Example 4 | // 5 | // Created by Cruz on 12/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import Flags 10 | 11 | extension Flag { 12 | var emojiWithName: String { 13 | guard let countryName = countryName else { return emoji } 14 | return emoji + " " + countryName 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Example/Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Example/Example/ListFlags/ListFlagCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListFlagCell.swift 3 | // Example 4 | // 5 | // Created by Cruz on 04/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import HypeUI 11 | 12 | final class ListFlagCell: UICollectionViewCell { 13 | static let identifier = "ListFlagCell" 14 | 15 | @Behavior var flag: String? 16 | @Behavior var name: String? 17 | 18 | override init(frame: CGRect) { 19 | super.init(frame: frame) 20 | backgroundColor = .white 21 | 22 | contentView.addSubviewWithFit( 23 | HStack(alignment: .center, spacing: 10) { 24 | Text() 25 | .foregroundColor(UIColor.black) 26 | .font(UIFont.boldSystemFont(ofSize: 14.0)) 27 | .textAligned(.left) 28 | .linked($flag, keyPath: \.text) 29 | Text() 30 | .foregroundColor(UIColor.black) 31 | .font(UIFont.systemFont(ofSize: 16, weight: .medium)) 32 | .textAligned(.left) 33 | .linked($name, keyPath: \.text) 34 | Spacer() 35 | } 36 | .padding(.horizontal, 20) 37 | ) 38 | } 39 | 40 | required init?(coder aDecoder: NSCoder) { 41 | fatalError("init(coder:) has not been implemented") 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Example/Example/ListFlags/ListFlagSectionController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListFlagSectionController.swift 3 | // Example 4 | // 5 | // Created by Cruz on 04/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Flags 11 | import IGListKit 12 | 13 | class ListFlagSectionController: ListSectionController { 14 | var model: FlagDiffable? 15 | 16 | override func sizeForItem(at index: Int) -> CGSize { 17 | guard let context = collectionContext else { return .zero } 18 | return CGSize(width: context.containerSize.width, height: 50.0) 19 | } 20 | 21 | override func cellForItem(at index: Int) -> UICollectionViewCell { 22 | guard let cell = collectionContext?.dequeueReusableCell( 23 | of: ListFlagCell.self, 24 | withReuseIdentifier: ListFlagCell.identifier, 25 | for: self, 26 | at: index) as? ListFlagCell else { 27 | fatalError() 28 | } 29 | cell.flag = model?.flag.emoji 30 | cell.name = model?.flag.countryName 31 | return cell 32 | } 33 | 34 | override func didUpdate(to object: Any) { 35 | model = object as? FlagDiffable 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Example/ListFlags/ListFlagsModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListFlagsModel.swift 3 | // Example 4 | // 5 | // Created by Cruz on 04/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Flags 11 | import IGListKit 12 | import RxCocoa 13 | import RxSwift 14 | import RxIGListKit 15 | 16 | protocol FlagType { 17 | var emoji: String { get } 18 | var countryCode: String { get } 19 | var countryName: String? { get } 20 | } 21 | 22 | extension Flag: FlagType {} 23 | 24 | class FlagDiffable: SectionModelDiffable { 25 | var flag: FlagType 26 | var countryCode: String { 27 | return flag.countryCode 28 | } 29 | 30 | var text: String? { 31 | return Flag(countryCode: countryCode)?.emojiWithName 32 | } 33 | 34 | init?(flag: FlagType?) { 35 | guard let flag = flag else { return nil } 36 | self.flag = flag 37 | } 38 | 39 | func diffIdentifier() -> NSObjectProtocol { 40 | return countryCode as NSObjectProtocol 41 | } 42 | 43 | func isEqual(toDiffableObject object: ListDiffable?) -> Bool { 44 | if let flag = object as? FlagDiffable { 45 | return countryCode == flag.countryCode 46 | } 47 | 48 | return self === object 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Example/ListFlags/ListFlagsReactor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListFlagsReactor.swift 3 | // Example 4 | // 5 | // Created by Cruz on 04/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Flags 11 | import ReactorKit 12 | import RxSwift 13 | 14 | class ListFlagsReactor: Reactor { 15 | let flags = NSLocale.isoCountryCodes.compactMap { Flag(countryCode: $0) } 16 | 17 | enum Action { 18 | case typing(text: String) 19 | } 20 | 21 | enum Mutation { 22 | case filter(key: String) 23 | } 24 | 25 | struct State { 26 | var flags: [Flag] 27 | } 28 | 29 | lazy var initialState = State(flags: flags) 30 | 31 | func mutate(action: Action) -> Observable { 32 | switch action { 33 | case .typing(let text): 34 | return .just(Mutation.filter(key: text)) 35 | } 36 | } 37 | 38 | func reduce(state: State, mutation: Mutation) -> State { 39 | var state = state 40 | switch mutation { 41 | case .filter(let key): 42 | if key.isEmpty { 43 | state.flags = flags 44 | } else { 45 | state.flags = flags.filter { 46 | $0.countryCode.lowercased().contains(key.lowercased()) || 47 | $0.countryName?.lowercased().contains(key.lowercased()) ?? false 48 | } 49 | } 50 | } 51 | return state 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/Example/ListFlags/ListFlagsViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListFlagsViewController.swift 3 | // Example 4 | // 5 | // Created by Cruz on 04/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Flags 11 | import IGListKit 12 | import ReactorKit 13 | import RxCocoa 14 | import RxOptional 15 | import RxSwift 16 | import SnapKit 17 | import RxIGListKit 18 | 19 | class ListFlagsViewController: UIViewController, View { 20 | var searchBar: UISearchBar = { 21 | let searchBar = UISearchBar() 22 | return searchBar 23 | }() 24 | 25 | // IGListKit 26 | lazy var adapter: ListAdapter = { 27 | let adapter = ListAdapter(updater: ListAdapterUpdater(), 28 | viewController: self, 29 | workingRangeSize: 2) 30 | adapter.collectionView = collectionView 31 | return adapter 32 | }() 33 | 34 | var collectionView: ListCollectionView = { 35 | let collectionView = ListCollectionView() 36 | collectionView.collectionViewLayout = ListCollectionViewLayout(stickyHeaders: false, 37 | topContentInset: 0, 38 | stretchToEdge: false) 39 | collectionView.isPrefetchingEnabled = false 40 | collectionView.backgroundColor = .white 41 | collectionView.register(ListFlagCell.self, 42 | forCellWithReuseIdentifier: ListFlagCell.identifier) 43 | return collectionView 44 | }() 45 | 46 | // Rx 47 | 48 | var disposeBag = DisposeBag() 49 | 50 | override func viewDidLoad() { 51 | super.viewDidLoad() 52 | self.reactor = ListFlagsReactor() 53 | navigationItem.title = "🇸🇪 Flags" 54 | 55 | // Do any additional setup after loading the view. 56 | view.addSubview(searchBar) 57 | view.addSubview(collectionView) 58 | 59 | searchBar.snp.makeConstraints { maker in 60 | maker.leading.trailing.equalToSuperview() 61 | maker.top.equalTo(view.safeAreaLayoutGuide.snp.topMargin) 62 | maker.height.equalTo(44.0) 63 | } 64 | 65 | collectionView.snp.makeConstraints { maker in 66 | maker.top.equalTo(searchBar.snp.bottom) 67 | maker.leading.trailing.equalToSuperview() 68 | maker.bottom.equalTo(view.safeAreaLayoutGuide.snp.bottomMargin) 69 | } 70 | } 71 | 72 | func bind(reactor: ListFlagsReactor) { 73 | searchBar.rx.text 74 | .distinctUntilChanged() 75 | .filterNil() 76 | .map { Reactor.Action.typing(text: $0) } 77 | .bind(to: reactor.action) 78 | .disposed(by: disposeBag) 79 | 80 | reactor.state 81 | .map { $0.flags } 82 | .map { $0.compactMap { FlagDiffable(flag: $0) }} 83 | .bind(to: adapter.rx.objects(for: dataSource)) 84 | .disposed(by: disposeBag) 85 | } 86 | 87 | private var dataSource: RxListAdapterDataSource { 88 | RxListAdapterDataSource(sectionControllerProvider: { _,_ in 89 | ListFlagSectionController() 90 | }) 91 | } 92 | 93 | /* 94 | // MARK: - Navigation 95 | 96 | // In a storyboard-based application, you will often want to do a little preparation before navigation 97 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 98 | // Get the new view controller using segue.destination. 99 | // Pass the selected object to the new view controller. 100 | } 101 | */ 102 | 103 | } 104 | -------------------------------------------------------------------------------- /Example/ExampleTests/Flag+ExtensionSpec.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Flag+ExtensionSpec.swift 3 | // ExampleTests 4 | // 5 | // Created by Cruz on 12/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Flags 11 | import Quick 12 | import Nimble 13 | 14 | @testable import Example 15 | class FlagExtensionSpec: QuickSpec { 16 | override func spec() { 17 | super.spec() 18 | var sut: Flag! 19 | 20 | describe("Flag+Extension") { 21 | describe("given Sweden Flag") { 22 | beforeEach { 23 | sut = Flag(countryCode: "SE") 24 | } 25 | 26 | it("emoji with name should be '🇸🇪 Sweden'") { 27 | expect(sut.emojiWithName) == "🇸🇪 Sweden" 28 | } 29 | } 30 | 31 | describe("given Korea Flag") { 32 | beforeEach { 33 | sut = Flag(countryCode: "KR") 34 | } 35 | 36 | it("emoji with name should be '🇰🇷 South Korea'") { 37 | expect(sut.emojiWithName) == "🇰🇷 South Korea" 38 | } 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Example/ExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/ExampleTests/ListFlags/ListFlagsReactorSpec.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListFlagsReactorSpec.swift 3 | // ExampleTests 4 | // 5 | // Created by Cruz on 11/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Quick 11 | import Nimble 12 | 13 | @testable import Example 14 | class ListFlagsReactorSpec: QuickSpec { 15 | override func spec() { 16 | super.spec() 17 | var sut: ListFlagsReactor! 18 | beforeEach { 19 | sut = ListFlagsReactor() 20 | } 21 | 22 | describe("ListFlagsReactor") { 23 | context("when empty typing action") { 24 | beforeEach { 25 | sut.action.onNext(.typing(text: "")) 26 | } 27 | 28 | it("countryCodes count should greater than 254") { 29 | expect(sut.currentState.flags.count) 30 | .toEventually(beGreaterThan(254)) 31 | } 32 | } 33 | 34 | context("when country name 'Sweden' typing action") { 35 | beforeEach { 36 | sut.action.onNext(.typing(text: "Sweden")) 37 | } 38 | 39 | it("should filter 'SE' country code") { 40 | expect(sut.currentState.flags.first?.countryCode) 41 | .toEventually(equal("SE")) 42 | } 43 | } 44 | 45 | context("when 'S' typing action") { 46 | beforeEach { 47 | sut.action.onNext(.typing(text: "S")) 48 | } 49 | 50 | it("flags should not be empty") { 51 | expect(sut.currentState.flags.isEmpty) 52 | .toEventually(beFalse()) 53 | } 54 | } 55 | 56 | context("when 'W' typing action") { 57 | beforeEach { 58 | sut.action.onNext(.typing(text: "W")) 59 | } 60 | 61 | it("flags should not be empty") { 62 | expect(sut.currentState.flags.isEmpty) 63 | .toEventually(beFalse()) 64 | } 65 | } 66 | 67 | context("when 'SWEDEN' typing action") { 68 | beforeEach { 69 | sut.action.onNext(.typing(text: "SWEDEN")) 70 | } 71 | 72 | it("should filter 'SE' country code") { 73 | expect(sut.currentState.flags.first?.countryCode) 74 | .toEventually(equal("SE")) 75 | } 76 | } 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Example/ExampleTests/ListFlags/ListFlagsViewControllerSpec.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListFlagsViewControllerSpec.swift 3 | // ExampleTests 4 | // 5 | // Created by Cruz on 04/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Quick 11 | import Nimble 12 | 13 | @testable import Example 14 | class ListFlagsViewControllerTests: QuickSpec { 15 | 16 | override func spec() { 17 | super.spec() 18 | var sut: ListFlagsViewController! 19 | var window: UIWindow! 20 | 21 | beforeEach { 22 | sut = ListFlagsViewController() 23 | window = UIWindow() 24 | window.addSubview(sut.view) 25 | window.makeKeyAndVisible() 26 | RunLoop.current.run(until: Date()) 27 | } 28 | 29 | describe("ListFlagsViewController") { 30 | it("collectionView delegate & datasource should not be nil") { 31 | expect(sut.collectionView.delegate).toNot(beNil()) 32 | expect(sut.collectionView.dataSource).toNot(beNil()) 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Example/ExampleUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/ExampleUITests/ListFlags/ListFlagUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ListFlagUITests.swift 3 | // ExampleUITests 4 | // 5 | // Created by Cruz on 04/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ListFlagUITests: UITestCase { 12 | func testSearchFieldExists() { 13 | XCTAssertTrue(app.searchFields.firstMatch.exists) 14 | } 15 | 16 | func testCollectionViewExists() { 17 | XCTAssertTrue(app.collectionViews.firstMatch.exists) 18 | } 19 | 20 | func testFindSwedenFlagWhenTypingTextSE() { 21 | // given 22 | let searchField = app.searchFields.firstMatch 23 | 24 | // when 25 | searchField.tap() 26 | searchField.typeText("SE") 27 | 28 | // then 29 | XCTAssertTrue(app.staticTexts.matching(identifier: "🇸🇪 Sweden").firstMatch.exists) 30 | } 31 | 32 | func testDefaultListFlags() { 33 | let collectionView = app.collectionViews.firstMatch 34 | XCTAssertTrue(collectionView.cells.count > 0) 35 | } 36 | 37 | func testFindSwedenFlagWhenTypingTextSweden() { 38 | // given 39 | let searchField = app.searchFields.firstMatch 40 | 41 | // when 42 | searchField.tap() 43 | searchField.typeText("Sweden") 44 | 45 | // then 46 | XCTAssertTrue(app.staticTexts.matching(identifier: "🇸🇪 Sweden").firstMatch.exists) 47 | } 48 | 49 | func testFindSwedenFlagWhenTypingTextSw() { 50 | // given 51 | let searchField = app.searchFields.firstMatch 52 | 53 | // when 54 | searchField.tap() 55 | searchField.typeText("Sw") 56 | 57 | // then 58 | XCTAssertTrue(app.staticTexts.matching(identifier: "🇸🇪 Sweden").firstMatch.exists) 59 | } 60 | 61 | func testFindSwedenFlagWhenTypingTextwe() { 62 | // given 63 | let searchField = app.searchFields.firstMatch 64 | 65 | // when 66 | searchField.tap() 67 | searchField.typeText("we") 68 | 69 | // then 70 | XCTAssertTrue(app.staticTexts.matching(identifier: "🇸🇪 Sweden").firstMatch.exists) 71 | } 72 | 73 | func testFindSwedenFlagWhenTypingUpperCaseTextSWEDEN() { 74 | // given 75 | let searchField = app.searchFields.firstMatch 76 | 77 | // when 78 | searchField.tap() 79 | searchField.typeText("SWEDEN") 80 | 81 | // then 82 | XCTAssertTrue(app.staticTexts.matching(identifier: "🇸🇪 Sweden").firstMatch.exists) 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Example/ExampleUITests/UITestCase.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UITestCase.swift 3 | // ExampleUITests 4 | // 5 | // Created by Cruz on 04/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class UITestCase: XCTestCase { 12 | 13 | var app: XCUIApplication! 14 | 15 | override func setUp() { 16 | super.setUp() 17 | 18 | app = XCUIApplication() 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | 21 | // In UI tests it is usually best to stop immediately when a failure occurs. 22 | continueAfterFailure = false 23 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 24 | app.launch() 25 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 26 | } 27 | 28 | override func tearDown() { 29 | // Put teardown code here. This method is called after the invocation of each test method in the class. 30 | super.tearDown() 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '12.0' 2 | inhibit_all_warnings! 3 | 4 | target 'Example' do 5 | use_frameworks! 6 | 7 | pod 'Flags', :path => '../' 8 | pod 'IGListKit', '4.0.0' 9 | pod 'SnapKit', '5.0.1' 10 | pod 'ReactorKit', '3.2.0' 11 | pod 'RxCocoa', '6.5.0' 12 | pod 'RxOptional', '5.0.0' 13 | pod 'RxSwift', '6.5.0' 14 | pod 'RxIGListKit', '2.0.2' 15 | pod 'HypeUI', '0.1.0' 16 | 17 | target 'ExampleTests' do 18 | inherit! :complete 19 | pod 'Quick', '1.3.2' 20 | pod 'Nimble', '7.3.1' 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flags (0.4.0) 3 | - HypeUI (0.1.0): 4 | - RxCocoa (~> 6.0) 5 | - RxSwift (~> 6.0) 6 | - SnapKit (~> 5.0.0) 7 | - IGListDiffKit (4.0.0) 8 | - IGListKit (4.0.0): 9 | - IGListDiffKit (= 4.0.0) 10 | - Nimble (7.3.1) 11 | - Quick (1.3.2) 12 | - ReactorKit (3.2.0): 13 | - RxSwift (~> 6.0) 14 | - WeakMapTable (~> 1.1) 15 | - RxCocoa (6.5.0): 16 | - RxRelay (= 6.5.0) 17 | - RxSwift (= 6.5.0) 18 | - RxIGListKit (2.0.2): 19 | - IGListKit (~> 4.0.0) 20 | - RxCocoa (~> 6.0) 21 | - RxOptional (5.0.0): 22 | - RxCocoa (~> 6.0) 23 | - RxSwift (~> 6.0) 24 | - RxRelay (6.5.0): 25 | - RxSwift (= 6.5.0) 26 | - RxSwift (6.5.0) 27 | - SnapKit (5.0.1) 28 | - WeakMapTable (1.2.0) 29 | 30 | DEPENDENCIES: 31 | - Flags (from `../`) 32 | - HypeUI (= 0.1.0) 33 | - IGListKit (= 4.0.0) 34 | - Nimble (= 7.3.1) 35 | - Quick (= 1.3.2) 36 | - ReactorKit (= 3.2.0) 37 | - RxCocoa (= 6.5.0) 38 | - RxIGListKit (= 2.0.2) 39 | - RxOptional (= 5.0.0) 40 | - RxSwift (= 6.5.0) 41 | - SnapKit (= 5.0.1) 42 | 43 | SPEC REPOS: 44 | trunk: 45 | - HypeUI 46 | - IGListDiffKit 47 | - IGListKit 48 | - Nimble 49 | - Quick 50 | - ReactorKit 51 | - RxCocoa 52 | - RxIGListKit 53 | - RxOptional 54 | - RxRelay 55 | - RxSwift 56 | - SnapKit 57 | - WeakMapTable 58 | 59 | EXTERNAL SOURCES: 60 | Flags: 61 | :path: "../" 62 | 63 | SPEC CHECKSUMS: 64 | Flags: 3d2caa5d3ce49a08580fdf477d07c52fb5463a45 65 | HypeUI: 462f4d0e149b8ef201983f16fdaf15b2b908ca10 66 | IGListDiffKit: 665d6cf43ce726e676013db9c7d6c4294259b6b2 67 | IGListKit: fd5a5d21935298f5849fa49d426843cff97b77c7 68 | Nimble: 04f732da099ea4d153122aec8c2a88fd0c7219ae 69 | Quick: 2623cb30d7a7f41ca62f684f679586558f483d46 70 | ReactorKit: e8b11d6b9c415405f381669b095c154a05b59eca 71 | RxCocoa: 94f817b71c07517321eb4f9ad299112ca8af743b 72 | RxIGListKit: 15a701dfdec1d625ce3c0bb412d5d1dcdb528b18 73 | RxOptional: cb0b05f0270854eb8ac322c4eb298c4945469fab 74 | RxRelay: 1de1523e604c72b6c68feadedd1af3b1b4d0ecbd 75 | RxSwift: 5710a9e6b17f3c3d6e40d6e559b9fa1e813b2ef8 76 | SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb 77 | WeakMapTable: 05c694ce8439a7a9ebabb56187287a63c57673d6 78 | 79 | PODFILE CHECKSUM: 237698a756138d58ecc01f9950fe51d6ddd3d54d 80 | 81 | COCOAPODS: 1.10.0 82 | -------------------------------------------------------------------------------- /Example/README.md: -------------------------------------------------------------------------------- 1 | # Flags 2 | 🇸🇪 Flags for iOS Rxswift, ReactorKit and IGListKit example 3 | 4 | ![Swift](https://img.shields.io/badge/Swift-4.2-orange.svg) 5 | 6 | ![flags](../README/flags.gif) 7 | 8 | ## Features 9 | 10 | * [Flags](https://github.com/cruisediary/Flags) - 🇸🇪 Flag extension make flag emoji, image 11 | * [IGListKit](https://github.com/Instagram/IGListKit) - A data-driven UICollectionView framework for building fast and flexible lists. 12 | * [ReactorKit](https://github.com/devxoul/ReactorKit) - A framework for reactive and unidirectional Swift application architecture 13 | * [RxIGListKit](https://github.com/yuzushioh/RxIGListKit) - IGListKit with RxSwift🚀 14 | * [RxSwift](https://github.com/ReactiveX/RxSwift) - Reactive Programming in Swift 15 | * [RxOptional](https://github.com/RxSwiftCommunity/RxOptional) - RxSwift extensions for Swift optionals and "Occupiable" types 16 | * [SnapKit](https://github.com/SnapKit/SnapKit) - A Swift Autolayout DSL for iOS & OS X 17 | 18 | #### Unit Test & UI Test 19 | * [Quick](https://github.com/Quick/Quick) - The Swift (and Objective-C) testing framework. 20 | * [Nimble](https://github.com/Quick/Nimble) - A Matcher Framework for Swift and Objective-C 21 | 22 | ## Requirements 23 | 24 | * iOS 11.0 25 | * Swift 4.2 26 | * CocoaPods 1.6.0.beta.2 27 | 28 | ## Author 29 | 30 | cruz, cruzdiary@gmail.com 31 | 32 | ## License 33 | 34 | Flags is available under the MIT license. See the LICENSE file for more info. 35 | -------------------------------------------------------------------------------- /Flags.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint Flags.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'Flags' 11 | s.version = '0.4.0' 12 | s.summary = 'Flags' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = 'Flag emoji, image extension' 21 | 22 | s.homepage = 'https://github.com/cruisediary/Flags' 23 | s.license = { :type => 'MIT', :file => 'LICENSE' } 24 | s.author = { 'cruz' => 'cruzdiary@gmail.com' } 25 | s.source = { :git => 'https://github.com/cruisediary/Flags.git', :tag => s.version.to_s } 26 | # s.social_media_url = 'https://twitter.com/' 27 | 28 | s.ios.deployment_target = '8.0' 29 | s.source_files = 'Flags/Sources/**/*' 30 | 31 | end 32 | -------------------------------------------------------------------------------- /Flags.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | FC3E20D5219F184100C3DA1F /* Flag+Country.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC3E20D4219F184100C3DA1F /* Flag+Country.swift */; }; 11 | FCF2F9DD217789F2003F958A /* Flags.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCF2F9D3217789F2003F958A /* Flags.framework */; }; 12 | FCF2F9E2217789F2003F958A /* FlagSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCF2F9E1217789F2003F958A /* FlagSpec.swift */; }; 13 | FCF2F9E4217789F2003F958A /* Flags.h in Headers */ = {isa = PBXBuildFile; fileRef = FCF2F9D6217789F2003F958A /* Flags.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | FCF2F9F121778A3C003F958A /* Flag+Emoji.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCF2F9EE21778A3C003F958A /* Flag+Emoji.swift */; }; 15 | FCF2F9F221778A3C003F958A /* Flag+UIImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCF2F9EF21778A3C003F958A /* Flag+UIImage.swift */; }; 16 | FCF2F9F321778A3C003F958A /* Flag.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCF2F9F021778A3C003F958A /* Flag.swift */; }; 17 | FCF2FA7B217ABF26003F958A /* Quick.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = FCF2FA79217ABF26003F958A /* Quick.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | FCF2FA7C217ABF26003F958A /* Nimble.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = FCF2FA7A217ABF26003F958A /* Nimble.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 19 | FCF2FA7E217ABF41003F958A /* Nimble.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCF2FA7A217ABF26003F958A /* Nimble.framework */; }; 20 | FCF2FA7F217ABF41003F958A /* Quick.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCF2FA79217ABF26003F958A /* Quick.framework */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | FCF2F9DE217789F2003F958A /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = FCF2F9CA217789F2003F958A /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = FCF2F9D2217789F2003F958A; 29 | remoteInfo = Flags; 30 | }; 31 | /* End PBXContainerItemProxy section */ 32 | 33 | /* Begin PBXCopyFilesBuildPhase section */ 34 | FCF2FA78217ABF10003F958A /* CopyFiles */ = { 35 | isa = PBXCopyFilesBuildPhase; 36 | buildActionMask = 2147483647; 37 | dstPath = ""; 38 | dstSubfolderSpec = 10; 39 | files = ( 40 | FCF2FA7B217ABF26003F958A /* Quick.framework in CopyFiles */, 41 | FCF2FA7C217ABF26003F958A /* Nimble.framework in CopyFiles */, 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXCopyFilesBuildPhase section */ 46 | 47 | /* Begin PBXFileReference section */ 48 | FC3E20D4219F184100C3DA1F /* Flag+Country.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Flag+Country.swift"; sourceTree = ""; }; 49 | FCF2F9D3217789F2003F958A /* Flags.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Flags.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | FCF2F9D6217789F2003F958A /* Flags.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Flags.h; sourceTree = ""; }; 51 | FCF2F9D7217789F2003F958A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | FCF2F9DC217789F2003F958A /* FlagsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FlagsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | FCF2F9E1217789F2003F958A /* FlagSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlagSpec.swift; sourceTree = ""; }; 54 | FCF2F9E3217789F2003F958A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | FCF2F9EE21778A3C003F958A /* Flag+Emoji.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Flag+Emoji.swift"; sourceTree = ""; }; 56 | FCF2F9EF21778A3C003F958A /* Flag+UIImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Flag+UIImage.swift"; sourceTree = ""; }; 57 | FCF2F9F021778A3C003F958A /* Flag.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Flag.swift; sourceTree = ""; }; 58 | FCF2FA79217ABF26003F958A /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quick.framework; path = Carthage/Build/iOS/Quick.framework; sourceTree = ""; }; 59 | FCF2FA7A217ABF26003F958A /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = Carthage/Build/iOS/Nimble.framework; sourceTree = ""; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | FCF2F9D0217789F2003F958A /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | FCF2F9D9217789F2003F958A /* Frameworks */ = { 71 | isa = PBXFrameworksBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | FCF2FA7E217ABF41003F958A /* Nimble.framework in Frameworks */, 75 | FCF2FA7F217ABF41003F958A /* Quick.framework in Frameworks */, 76 | FCF2F9DD217789F2003F958A /* Flags.framework in Frameworks */, 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXFrameworksBuildPhase section */ 81 | 82 | /* Begin PBXGroup section */ 83 | FCF2F9C9217789F2003F958A = { 84 | isa = PBXGroup; 85 | children = ( 86 | FCF2FA7A217ABF26003F958A /* Nimble.framework */, 87 | FCF2FA79217ABF26003F958A /* Quick.framework */, 88 | FCF2F9D5217789F2003F958A /* Flags */, 89 | FCF2F9E0217789F2003F958A /* FlagsTests */, 90 | FCF2F9D4217789F2003F958A /* Products */, 91 | FCF2FA7D217ABF41003F958A /* Frameworks */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | FCF2F9D4217789F2003F958A /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | FCF2F9D3217789F2003F958A /* Flags.framework */, 99 | FCF2F9DC217789F2003F958A /* FlagsTests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | FCF2F9D5217789F2003F958A /* Flags */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | FCF2F9ED21778A3C003F958A /* Sources */, 108 | FCF2F9D6217789F2003F958A /* Flags.h */, 109 | FCF2F9D7217789F2003F958A /* Info.plist */, 110 | ); 111 | path = Flags; 112 | sourceTree = ""; 113 | }; 114 | FCF2F9E0217789F2003F958A /* FlagsTests */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | FCF2F9E1217789F2003F958A /* FlagSpec.swift */, 118 | FCF2F9E3217789F2003F958A /* Info.plist */, 119 | ); 120 | path = FlagsTests; 121 | sourceTree = ""; 122 | }; 123 | FCF2F9ED21778A3C003F958A /* Sources */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | FCF2F9EE21778A3C003F958A /* Flag+Emoji.swift */, 127 | FCF2F9EF21778A3C003F958A /* Flag+UIImage.swift */, 128 | FCF2F9F021778A3C003F958A /* Flag.swift */, 129 | FC3E20D4219F184100C3DA1F /* Flag+Country.swift */, 130 | ); 131 | path = Sources; 132 | sourceTree = ""; 133 | }; 134 | FCF2FA7D217ABF41003F958A /* Frameworks */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | ); 138 | name = Frameworks; 139 | sourceTree = ""; 140 | }; 141 | /* End PBXGroup section */ 142 | 143 | /* Begin PBXHeadersBuildPhase section */ 144 | FCF2F9CE217789F2003F958A /* Headers */ = { 145 | isa = PBXHeadersBuildPhase; 146 | buildActionMask = 2147483647; 147 | files = ( 148 | FCF2F9E4217789F2003F958A /* Flags.h in Headers */, 149 | ); 150 | runOnlyForDeploymentPostprocessing = 0; 151 | }; 152 | /* End PBXHeadersBuildPhase section */ 153 | 154 | /* Begin PBXNativeTarget section */ 155 | FCF2F9D2217789F2003F958A /* Flags */ = { 156 | isa = PBXNativeTarget; 157 | buildConfigurationList = FCF2F9E7217789F2003F958A /* Build configuration list for PBXNativeTarget "Flags" */; 158 | buildPhases = ( 159 | FCF2F9CE217789F2003F958A /* Headers */, 160 | FCF2F9CF217789F2003F958A /* Sources */, 161 | FCF2F9D0217789F2003F958A /* Frameworks */, 162 | FCF2F9D1217789F2003F958A /* Resources */, 163 | ); 164 | buildRules = ( 165 | ); 166 | dependencies = ( 167 | ); 168 | name = Flags; 169 | productName = Flags; 170 | productReference = FCF2F9D3217789F2003F958A /* Flags.framework */; 171 | productType = "com.apple.product-type.framework"; 172 | }; 173 | FCF2F9DB217789F2003F958A /* FlagsTests */ = { 174 | isa = PBXNativeTarget; 175 | buildConfigurationList = FCF2F9EA217789F2003F958A /* Build configuration list for PBXNativeTarget "FlagsTests" */; 176 | buildPhases = ( 177 | FCF2F9D8217789F2003F958A /* Sources */, 178 | FCF2F9D9217789F2003F958A /* Frameworks */, 179 | FCF2F9DA217789F2003F958A /* Resources */, 180 | FCF2FA78217ABF10003F958A /* CopyFiles */, 181 | ); 182 | buildRules = ( 183 | ); 184 | dependencies = ( 185 | FCF2F9DF217789F2003F958A /* PBXTargetDependency */, 186 | ); 187 | name = FlagsTests; 188 | productName = FlagsTests; 189 | productReference = FCF2F9DC217789F2003F958A /* FlagsTests.xctest */; 190 | productType = "com.apple.product-type.bundle.unit-test"; 191 | }; 192 | /* End PBXNativeTarget section */ 193 | 194 | /* Begin PBXProject section */ 195 | FCF2F9CA217789F2003F958A /* Project object */ = { 196 | isa = PBXProject; 197 | attributes = { 198 | LastSwiftUpdateCheck = 1000; 199 | LastUpgradeCheck = 1000; 200 | ORGANIZATIONNAME = Cruz; 201 | TargetAttributes = { 202 | FCF2F9D2217789F2003F958A = { 203 | CreatedOnToolsVersion = 10.0; 204 | }; 205 | FCF2F9DB217789F2003F958A = { 206 | CreatedOnToolsVersion = 10.0; 207 | }; 208 | }; 209 | }; 210 | buildConfigurationList = FCF2F9CD217789F2003F958A /* Build configuration list for PBXProject "Flags" */; 211 | compatibilityVersion = "Xcode 9.3"; 212 | developmentRegion = en; 213 | hasScannedForEncodings = 0; 214 | knownRegions = ( 215 | en, 216 | ); 217 | mainGroup = FCF2F9C9217789F2003F958A; 218 | productRefGroup = FCF2F9D4217789F2003F958A /* Products */; 219 | projectDirPath = ""; 220 | projectRoot = ""; 221 | targets = ( 222 | FCF2F9D2217789F2003F958A /* Flags */, 223 | FCF2F9DB217789F2003F958A /* FlagsTests */, 224 | ); 225 | }; 226 | /* End PBXProject section */ 227 | 228 | /* Begin PBXResourcesBuildPhase section */ 229 | FCF2F9D1217789F2003F958A /* Resources */ = { 230 | isa = PBXResourcesBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | }; 236 | FCF2F9DA217789F2003F958A /* Resources */ = { 237 | isa = PBXResourcesBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | ); 241 | runOnlyForDeploymentPostprocessing = 0; 242 | }; 243 | /* End PBXResourcesBuildPhase section */ 244 | 245 | /* Begin PBXSourcesBuildPhase section */ 246 | FCF2F9CF217789F2003F958A /* Sources */ = { 247 | isa = PBXSourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | FCF2F9F121778A3C003F958A /* Flag+Emoji.swift in Sources */, 251 | FCF2F9F321778A3C003F958A /* Flag.swift in Sources */, 252 | FC3E20D5219F184100C3DA1F /* Flag+Country.swift in Sources */, 253 | FCF2F9F221778A3C003F958A /* Flag+UIImage.swift in Sources */, 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | }; 257 | FCF2F9D8217789F2003F958A /* Sources */ = { 258 | isa = PBXSourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | FCF2F9E2217789F2003F958A /* FlagSpec.swift in Sources */, 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | }; 265 | /* End PBXSourcesBuildPhase section */ 266 | 267 | /* Begin PBXTargetDependency section */ 268 | FCF2F9DF217789F2003F958A /* PBXTargetDependency */ = { 269 | isa = PBXTargetDependency; 270 | target = FCF2F9D2217789F2003F958A /* Flags */; 271 | targetProxy = FCF2F9DE217789F2003F958A /* PBXContainerItemProxy */; 272 | }; 273 | /* End PBXTargetDependency section */ 274 | 275 | /* Begin XCBuildConfiguration section */ 276 | FCF2F9E5217789F2003F958A /* Debug */ = { 277 | isa = XCBuildConfiguration; 278 | buildSettings = { 279 | ALWAYS_SEARCH_USER_PATHS = NO; 280 | CLANG_ANALYZER_NONNULL = YES; 281 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 282 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 283 | CLANG_CXX_LIBRARY = "libc++"; 284 | CLANG_ENABLE_MODULES = YES; 285 | CLANG_ENABLE_OBJC_ARC = YES; 286 | CLANG_ENABLE_OBJC_WEAK = YES; 287 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 288 | CLANG_WARN_BOOL_CONVERSION = YES; 289 | CLANG_WARN_COMMA = YES; 290 | CLANG_WARN_CONSTANT_CONVERSION = YES; 291 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 292 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 293 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 294 | CLANG_WARN_EMPTY_BODY = YES; 295 | CLANG_WARN_ENUM_CONVERSION = YES; 296 | CLANG_WARN_INFINITE_RECURSION = YES; 297 | CLANG_WARN_INT_CONVERSION = YES; 298 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 299 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 300 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 301 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 302 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 303 | CLANG_WARN_STRICT_PROTOTYPES = YES; 304 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 305 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 306 | CLANG_WARN_UNREACHABLE_CODE = YES; 307 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 308 | CODE_SIGN_IDENTITY = "iPhone Developer"; 309 | COPY_PHASE_STRIP = NO; 310 | CURRENT_PROJECT_VERSION = 1; 311 | DEBUG_INFORMATION_FORMAT = dwarf; 312 | ENABLE_STRICT_OBJC_MSGSEND = YES; 313 | ENABLE_TESTABILITY = YES; 314 | GCC_C_LANGUAGE_STANDARD = gnu11; 315 | GCC_DYNAMIC_NO_PIC = NO; 316 | GCC_NO_COMMON_BLOCKS = YES; 317 | GCC_OPTIMIZATION_LEVEL = 0; 318 | GCC_PREPROCESSOR_DEFINITIONS = ( 319 | "DEBUG=1", 320 | "$(inherited)", 321 | ); 322 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 323 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 324 | GCC_WARN_UNDECLARED_SELECTOR = YES; 325 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 326 | GCC_WARN_UNUSED_FUNCTION = YES; 327 | GCC_WARN_UNUSED_VARIABLE = YES; 328 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 329 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 330 | MTL_FAST_MATH = YES; 331 | ONLY_ACTIVE_ARCH = YES; 332 | SDKROOT = iphoneos; 333 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 334 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 335 | VERSIONING_SYSTEM = "apple-generic"; 336 | VERSION_INFO_PREFIX = ""; 337 | }; 338 | name = Debug; 339 | }; 340 | FCF2F9E6217789F2003F958A /* Release */ = { 341 | isa = XCBuildConfiguration; 342 | buildSettings = { 343 | ALWAYS_SEARCH_USER_PATHS = NO; 344 | CLANG_ANALYZER_NONNULL = YES; 345 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 346 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 347 | CLANG_CXX_LIBRARY = "libc++"; 348 | CLANG_ENABLE_MODULES = YES; 349 | CLANG_ENABLE_OBJC_ARC = YES; 350 | CLANG_ENABLE_OBJC_WEAK = YES; 351 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 352 | CLANG_WARN_BOOL_CONVERSION = YES; 353 | CLANG_WARN_COMMA = YES; 354 | CLANG_WARN_CONSTANT_CONVERSION = YES; 355 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 356 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 357 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 358 | CLANG_WARN_EMPTY_BODY = YES; 359 | CLANG_WARN_ENUM_CONVERSION = YES; 360 | CLANG_WARN_INFINITE_RECURSION = YES; 361 | CLANG_WARN_INT_CONVERSION = YES; 362 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 363 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 364 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 365 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 366 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 367 | CLANG_WARN_STRICT_PROTOTYPES = YES; 368 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 369 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 370 | CLANG_WARN_UNREACHABLE_CODE = YES; 371 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 372 | CODE_SIGN_IDENTITY = "iPhone Developer"; 373 | COPY_PHASE_STRIP = NO; 374 | CURRENT_PROJECT_VERSION = 1; 375 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 376 | ENABLE_NS_ASSERTIONS = NO; 377 | ENABLE_STRICT_OBJC_MSGSEND = YES; 378 | GCC_C_LANGUAGE_STANDARD = gnu11; 379 | GCC_NO_COMMON_BLOCKS = YES; 380 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 381 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 382 | GCC_WARN_UNDECLARED_SELECTOR = YES; 383 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 384 | GCC_WARN_UNUSED_FUNCTION = YES; 385 | GCC_WARN_UNUSED_VARIABLE = YES; 386 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 387 | MTL_ENABLE_DEBUG_INFO = NO; 388 | MTL_FAST_MATH = YES; 389 | SDKROOT = iphoneos; 390 | SWIFT_COMPILATION_MODE = wholemodule; 391 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 392 | VALIDATE_PRODUCT = YES; 393 | VERSIONING_SYSTEM = "apple-generic"; 394 | VERSION_INFO_PREFIX = ""; 395 | }; 396 | name = Release; 397 | }; 398 | FCF2F9E8217789F2003F958A /* Debug */ = { 399 | isa = XCBuildConfiguration; 400 | buildSettings = { 401 | CODE_SIGN_IDENTITY = ""; 402 | CODE_SIGN_STYLE = Automatic; 403 | DEFINES_MODULE = YES; 404 | DYLIB_COMPATIBILITY_VERSION = 1; 405 | DYLIB_CURRENT_VERSION = 1; 406 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 407 | INFOPLIST_FILE = Flags/Info.plist; 408 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 409 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 410 | LD_RUNPATH_SEARCH_PATHS = ( 411 | "$(inherited)", 412 | "@executable_path/Frameworks", 413 | "@loader_path/Frameworks", 414 | ); 415 | PRODUCT_BUNDLE_IDENTIFIER = Cruz.Flags; 416 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 417 | SKIP_INSTALL = YES; 418 | SWIFT_VERSION = 4.2; 419 | TARGETED_DEVICE_FAMILY = "1,2"; 420 | }; 421 | name = Debug; 422 | }; 423 | FCF2F9E9217789F2003F958A /* Release */ = { 424 | isa = XCBuildConfiguration; 425 | buildSettings = { 426 | CODE_SIGN_IDENTITY = ""; 427 | CODE_SIGN_STYLE = Automatic; 428 | DEFINES_MODULE = YES; 429 | DYLIB_COMPATIBILITY_VERSION = 1; 430 | DYLIB_CURRENT_VERSION = 1; 431 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 432 | INFOPLIST_FILE = Flags/Info.plist; 433 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 434 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 435 | LD_RUNPATH_SEARCH_PATHS = ( 436 | "$(inherited)", 437 | "@executable_path/Frameworks", 438 | "@loader_path/Frameworks", 439 | ); 440 | PRODUCT_BUNDLE_IDENTIFIER = Cruz.Flags; 441 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 442 | SKIP_INSTALL = YES; 443 | SWIFT_VERSION = 4.2; 444 | TARGETED_DEVICE_FAMILY = "1,2"; 445 | }; 446 | name = Release; 447 | }; 448 | FCF2F9EB217789F2003F958A /* Debug */ = { 449 | isa = XCBuildConfiguration; 450 | buildSettings = { 451 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 452 | CODE_SIGN_STYLE = Automatic; 453 | FRAMEWORK_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Carthage/Build/iOS", 456 | ); 457 | INFOPLIST_FILE = FlagsTests/Info.plist; 458 | LD_RUNPATH_SEARCH_PATHS = ( 459 | "$(inherited)", 460 | "@executable_path/Frameworks", 461 | "@loader_path/Frameworks", 462 | ); 463 | PRODUCT_BUNDLE_IDENTIFIER = Cruz.FlagsTests; 464 | PRODUCT_NAME = "$(TARGET_NAME)"; 465 | SWIFT_VERSION = 4.2; 466 | TARGETED_DEVICE_FAMILY = "1,2"; 467 | }; 468 | name = Debug; 469 | }; 470 | FCF2F9EC217789F2003F958A /* Release */ = { 471 | isa = XCBuildConfiguration; 472 | buildSettings = { 473 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 474 | CODE_SIGN_STYLE = Automatic; 475 | FRAMEWORK_SEARCH_PATHS = ( 476 | "$(inherited)", 477 | "$(PROJECT_DIR)/Carthage/Build/iOS", 478 | ); 479 | INFOPLIST_FILE = FlagsTests/Info.plist; 480 | LD_RUNPATH_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "@executable_path/Frameworks", 483 | "@loader_path/Frameworks", 484 | ); 485 | PRODUCT_BUNDLE_IDENTIFIER = Cruz.FlagsTests; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | SWIFT_VERSION = 4.2; 488 | TARGETED_DEVICE_FAMILY = "1,2"; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | FCF2F9CD217789F2003F958A /* Build configuration list for PBXProject "Flags" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | FCF2F9E5217789F2003F958A /* Debug */, 499 | FCF2F9E6217789F2003F958A /* Release */, 500 | ); 501 | defaultConfigurationIsVisible = 0; 502 | defaultConfigurationName = Release; 503 | }; 504 | FCF2F9E7217789F2003F958A /* Build configuration list for PBXNativeTarget "Flags" */ = { 505 | isa = XCConfigurationList; 506 | buildConfigurations = ( 507 | FCF2F9E8217789F2003F958A /* Debug */, 508 | FCF2F9E9217789F2003F958A /* Release */, 509 | ); 510 | defaultConfigurationIsVisible = 0; 511 | defaultConfigurationName = Release; 512 | }; 513 | FCF2F9EA217789F2003F958A /* Build configuration list for PBXNativeTarget "FlagsTests" */ = { 514 | isa = XCConfigurationList; 515 | buildConfigurations = ( 516 | FCF2F9EB217789F2003F958A /* Debug */, 517 | FCF2F9EC217789F2003F958A /* Release */, 518 | ); 519 | defaultConfigurationIsVisible = 0; 520 | defaultConfigurationName = Release; 521 | }; 522 | /* End XCConfigurationList section */ 523 | }; 524 | rootObject = FCF2F9CA217789F2003F958A /* Project object */; 525 | } 526 | -------------------------------------------------------------------------------- /Flags.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Flags.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Flags.xcodeproj/xcshareddata/xcschemes/Flags.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Flags/Flags.h: -------------------------------------------------------------------------------- 1 | // 2 | // Flags.h 3 | // Flags 4 | // 5 | // Created by Cruz on 18/10/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Flags. 12 | FOUNDATION_EXPORT double FlagsVersionNumber; 13 | 14 | //! Project version string for Flags. 15 | FOUNDATION_EXPORT const unsigned char FlagsVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Flags/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.4.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Flags/Sources/Flag+Country.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Flag+Country.swift 3 | // Flags 4 | // 5 | // Created by Cruz on 17/11/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public extension Flag { 12 | static var locale: Locale = Locale.current 13 | 14 | public var countryName: String? { 15 | return Flag.locale.localizedString(forRegionCode: countryCode) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Flags/Sources/Flag+Emoji.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Flag+Emoji.swift 3 | // Flags 4 | // 5 | // Created by Cruz on 10/10/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | public extension Flag { 10 | public var emoji: String { 11 | let base = 127397 12 | let usv = countryCode.utf16 13 | .map { base + Int($0) } 14 | .compactMap(UnicodeScalar.init) 15 | .reduce(String.UnicodeScalarView()) { $0 + [$1] } 16 | 17 | return String(usv) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Flags/Sources/Flag+UIImage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Flag+UIImage.swift 3 | // Flags 4 | // 5 | // Created by Cruz on 10/10/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | public extension Flag { 10 | public func image(size: CGSize, color: UIColor = UIColor.white) -> UIImage? { 11 | defer { UIGraphicsEndImageContext() } 12 | UIGraphicsBeginImageContextWithOptions(size, false, 0) 13 | color.set() 14 | let rect = CGRect(origin: .zero, size: size) 15 | UIRectFill(CGRect(origin: .zero, size: size)) 16 | emoji.draw(in: rect, withAttributes: [.font: UIFont.systemFont(ofSize: size.height)]) 17 | return UIGraphicsGetImageFromCurrentImageContext() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Flags/Sources/Flag.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Flag.swift 3 | // Flags 4 | // 5 | // Created by Cruz on 10/10/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | public struct Flag { 10 | public let countryCode: String 11 | 12 | public init?(countryCode: String) { 13 | guard NSLocale.isoCountryCodes.contains(countryCode.uppercased()) else { return nil } 14 | self.countryCode = countryCode.uppercased() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /FlagsTests/FlagSpec.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FlagSpec.swift 3 | // FlagSpec 4 | // 5 | // Created by Cruz on 18/10/2018. 6 | // Copyright © 2018 Cruz. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Quick 11 | import Nimble 12 | 13 | @testable import Flags 14 | class FlagSpec: QuickSpec { 15 | 16 | override func spec() { 17 | super.spec() 18 | var sut: Flag? 19 | 20 | describe("Flag") { 21 | for countryCode in NSLocale.isoCountryCodes { 22 | context("when country code is \(countryCode)") { 23 | beforeEach { 24 | sut = Flag(countryCode: countryCode) 25 | } 26 | 27 | it("should not be nil") { 28 | expect(sut).toNot(beNil()) 29 | } 30 | 31 | it("emoji should not be nil") { 32 | expect(sut?.emoji).toNot(beNil()) 33 | } 34 | 35 | it("image should not be nil") { 36 | expect(sut?.image).toNot(beNil()) 37 | } 38 | 39 | it("country name should not be nil") { 40 | expect(sut?.countryName).toNot(beNil()) 41 | } 42 | } 43 | 44 | context("when country code is lowercased \(countryCode.lowercased())") { 45 | beforeEach { 46 | sut = Flag(countryCode: countryCode.lowercased()) 47 | } 48 | 49 | it("should not be nil") { 50 | expect(sut).toNot(beNil()) 51 | } 52 | 53 | it("emoji should not be nil") { 54 | expect(sut?.emoji).toNot(beNil()) 55 | } 56 | 57 | it("image should not be nil") { 58 | expect(sut?.image).toNot(beNil()) 59 | } 60 | } 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /FlagsTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 0.4.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Cruz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flags 2 | 🇸🇪 Flag extension 3 | 4 | ![Swift](https://img.shields.io/badge/Swift-4.2-orange.svg) 5 | [![Version](https://img.shields.io/cocoapods/v/Flags.svg?style=flat)](http://cocoapods.org/pods/Flags) 6 | [![License](https://img.shields.io/cocoapods/l/Flags.svg?style=flat)](http://cocoapods.org/pods/Flags) 7 | [![Platform](https://img.shields.io/cocoapods/p/Flags.svg?style=flat)](http://cocoapods.org/pods/Flags) 8 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 9 | [![Codecov](https://img.shields.io/codecov/c/github/cruisediary/Flags.svg)](https://codecov.io/gh/cruisediary/Flags) 10 | 11 | ![flags](README/flags.gif) 12 | 13 | ## Usage 14 | ```swift 15 | let flag = Flag(countryCode: "SE") 16 | 17 | let countryLabel = UILabel() 18 | countryLabel.text = flag?.emoji // 🇸🇪 19 | 20 | let countryNameLabel = UILabel() 21 | countryNameLabel.text = flag?.countryName // Sweden 22 | 23 | let countryImage = UIImageView() 24 | countryImage.image = flag?.image // 🇸🇪 to image 25 | 26 | ``` 27 | 28 | ## Example 29 | - [Flags](https://github.com/cruisediary/Flags/tree/master/Example) - Flags for iOS Rxswift, ReactorKit and IGListKit example 30 | 31 | ## Requirements 32 | Flags is written in Xcode 10, Swift 4.2, iOS 8.0 Required 33 | 34 | ## 📲 Installation 35 | Flags is available through [Cocoapods](http://cocoapods.org) or [Carthage](https://github.com/Carthage/Carthage). 36 | 37 | ### Cocoapods 38 | ```ruby 39 | pod "Flags" 40 | ``` 41 | 42 | ### Carthage 43 | ``` 44 | github "cruisediary/Flags" ~> 0.4.0 45 | ``` 46 | 47 | ## ❤️ Contribution 48 | Pull requests are always welcomed 🏄🏼 49 | 50 | ## 👨‍💻 Author 51 | cruz, cruzdiary@gmail.com 52 | 53 | ## 🛡 License 54 | 55 | Flags is available under the MIT license. See the LICENSE file for more info. 56 | -------------------------------------------------------------------------------- /README/flags.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cruisediary/Flags/2459275b3bb92d72945e61d4504d82cb19f36632/README/flags.gif -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "FlagsTests/" 3 | 4 | coverage: 5 | status: 6 | project: no 7 | patch: no 8 | changes: no 9 | --------------------------------------------------------------------------------