├── .gitignore ├── Clockmoji.playground ├── Contents.swift └── contents.xcplayground ├── Clockmoji.podspec ├── Clockmoji.xcodeproj ├── Info.plist ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── Clockmoji iOS.xcscheme │ ├── Clockmoji macOS.xcscheme │ ├── Clockmoji tvOS.xcscheme │ └── Clockmoji watchOS.xcscheme ├── LICENSE.md ├── Package.swift ├── README.md └── Sources └── ClockFace.swift /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/macos,linux,swift,vagrant,xcode 3 | 4 | ### macOS ### 5 | *.DS_Store 6 | .AppleDouble 7 | .LSOverride 8 | 9 | # Icon must end with two \r 10 | Icon 11 | 12 | # Thumbnails 13 | ._* 14 | 15 | # Files that might appear in the root of a volume 16 | .DocumentRevisions-V100 17 | .fseventsd 18 | .Spotlight-V100 19 | .TemporaryItems 20 | .Trashes 21 | .VolumeIcon.icns 22 | .com.apple.timemachine.donotpresent 23 | 24 | # Directories potentially created on remote AFP share 25 | .AppleDB 26 | .AppleDesktop 27 | Network Trash Folder 28 | Temporary Items 29 | .apdisk 30 | 31 | 32 | ### Linux ### 33 | *~ 34 | 35 | # temporary files which can be created if a process still has a handle open of a deleted file 36 | .fuse_hidden* 37 | 38 | # KDE directory preferences 39 | .directory 40 | 41 | # Linux trash folder which might appear on any partition or disk 42 | .Trash-* 43 | 44 | 45 | ### Swift ### 46 | # Xcode 47 | # 48 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 49 | 50 | ## Build generated 51 | build/ 52 | DerivedData/ 53 | 54 | ## Various settings 55 | *.pbxuser 56 | !default.pbxuser 57 | *.mode1v3 58 | !default.mode1v3 59 | *.mode2v3 60 | !default.mode2v3 61 | *.perspectivev3 62 | !default.perspectivev3 63 | xcuserdata/ 64 | 65 | ## Other 66 | *.moved-aside 67 | *.xcuserstate 68 | 69 | ## Obj-C/Swift specific 70 | *.hmap 71 | *.ipa 72 | *.dSYM.zip 73 | *.dSYM 74 | 75 | ## Playgrounds 76 | timeline.xctimeline 77 | playground.xcworkspace 78 | 79 | # Swift Package Manager 80 | # 81 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 82 | # Packages/ 83 | .build/ 84 | 85 | # CocoaPods 86 | # 87 | # We recommend against adding the Pods directory to your .gitignore. However 88 | # you should judge for yourself, the pros and cons are mentioned at: 89 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 90 | # 91 | # Pods/ 92 | 93 | # Carthage 94 | # 95 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 96 | # Carthage/Checkouts 97 | 98 | Carthage/Build 99 | 100 | # fastlane 101 | # 102 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 103 | # screenshots whenever they are needed. 104 | # For more information about the recommended setup visit: 105 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 106 | 107 | fastlane/report.xml 108 | fastlane/Preview.html 109 | fastlane/screenshots 110 | fastlane/test_output 111 | 112 | 113 | ### Vagrant ### 114 | .vagrant/ 115 | 116 | 117 | ### Xcode ### 118 | # Xcode 119 | # 120 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 121 | 122 | ## Build generated 123 | build/ 124 | DerivedData/ 125 | 126 | ## Various settings 127 | *.pbxuser 128 | !default.pbxuser 129 | *.mode1v3 130 | !default.mode1v3 131 | *.mode2v3 132 | !default.mode2v3 133 | *.perspectivev3 134 | !default.perspectivev3 135 | xcuserdata/ 136 | 137 | ## Other 138 | *.moved-aside 139 | *.xccheckout 140 | *.xcscmblueprint 141 | -------------------------------------------------------------------------------- /Clockmoji.playground/Contents.swift: -------------------------------------------------------------------------------- 1 | /*: 2 | # Clockmoji 3 | Use this playground to try out Clockmoji 4 | */ 5 | import Clockmoji 6 | -------------------------------------------------------------------------------- /Clockmoji.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Clockmoji.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Clockmoji" 3 | s.version = "1.0.0" 4 | s.summary = "Simple and intuitive time formatting using clock emoji." 5 | s.homepage = "https://github.com/nvzqz/#{s.name}" 6 | s.license = { :type => "MIT", :file => "LICENSE.md" } 7 | s.author = "Nikolai Vazquez" 8 | s.social_media_url = "https://twitter.com/nikolaivazquez" 9 | s.ios.deployment_target = "8.0" 10 | s.osx.deployment_target = "10.9" 11 | s.watchos.deployment_target = '2.0' 12 | s.tvos.deployment_target = '9.0' 13 | s.source = { :git => "https://github.com/nvzqz/#{s.name}.git", :tag => "v#{s.version}" } 14 | s.source_files = "Sources/*.swift" 15 | end 16 | -------------------------------------------------------------------------------- /Clockmoji.xcodeproj/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Clockmoji.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 520683301D6CFD6700160547 /* ClockFace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5206832F1D6CFD6700160547 /* ClockFace.swift */; }; 11 | 520683311D6CFD6700160547 /* ClockFace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5206832F1D6CFD6700160547 /* ClockFace.swift */; }; 12 | 520683321D6CFD6700160547 /* ClockFace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5206832F1D6CFD6700160547 /* ClockFace.swift */; }; 13 | 520683331D6CFD6700160547 /* ClockFace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5206832F1D6CFD6700160547 /* ClockFace.swift */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | 520682FB1D6CFBBB00160547 /* Clockmoji.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Clockmoji.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | 520683091D6CFBC700160547 /* Clockmoji.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Clockmoji.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | 520683161D6CFBD500160547 /* Clockmoji.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Clockmoji.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 520683231D6CFBDF00160547 /* Clockmoji.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Clockmoji.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 5206832D1D6CFC4A00160547 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Clockmoji.xcodeproj/Info.plist; sourceTree = ""; }; 22 | 5206832E1D6CFD1A00160547 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = ""; }; 23 | 5206832F1D6CFD6700160547 /* ClockFace.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClockFace.swift; sourceTree = ""; }; 24 | 520683341D6CFF1300160547 /* Clockmoji.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Clockmoji.playground; sourceTree = ""; }; 25 | 5206833A1D6D497400160547 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 26 | 5206833B1D6D5F8300160547 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | 520682F71D6CFBBB00160547 /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | 520683051D6CFBC700160547 /* Frameworks */ = { 38 | isa = PBXFrameworksBuildPhase; 39 | buildActionMask = 2147483647; 40 | files = ( 41 | ); 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | 520683121D6CFBD500160547 /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | 5206831F1D6CFBDF00160547 /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXFrameworksBuildPhase section */ 59 | 60 | /* Begin PBXGroup section */ 61 | 520682EF1D6CFB9100160547 = { 62 | isa = PBXGroup; 63 | children = ( 64 | 5206832B1D6CFC3A00160547 /* Sources */, 65 | 5206832C1D6CFC3E00160547 /* Support */, 66 | 520682FC1D6CFBBB00160547 /* Products */, 67 | 520683341D6CFF1300160547 /* Clockmoji.playground */, 68 | 5206833B1D6D5F8300160547 /* Package.swift */, 69 | 5206832E1D6CFD1A00160547 /* LICENSE.md */, 70 | 5206833A1D6D497400160547 /* README.md */, 71 | ); 72 | sourceTree = ""; 73 | }; 74 | 520682FC1D6CFBBB00160547 /* Products */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 520682FB1D6CFBBB00160547 /* Clockmoji.framework */, 78 | 520683091D6CFBC700160547 /* Clockmoji.framework */, 79 | 520683161D6CFBD500160547 /* Clockmoji.framework */, 80 | 520683231D6CFBDF00160547 /* Clockmoji.framework */, 81 | ); 82 | name = Products; 83 | sourceTree = ""; 84 | }; 85 | 5206832B1D6CFC3A00160547 /* Sources */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 5206832F1D6CFD6700160547 /* ClockFace.swift */, 89 | ); 90 | path = Sources; 91 | sourceTree = ""; 92 | }; 93 | 5206832C1D6CFC3E00160547 /* Support */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 5206832D1D6CFC4A00160547 /* Info.plist */, 97 | ); 98 | name = Support; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXHeadersBuildPhase section */ 104 | 520682F81D6CFBBB00160547 /* Headers */ = { 105 | isa = PBXHeadersBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | ); 109 | runOnlyForDeploymentPostprocessing = 0; 110 | }; 111 | 520683061D6CFBC700160547 /* Headers */ = { 112 | isa = PBXHeadersBuildPhase; 113 | buildActionMask = 2147483647; 114 | files = ( 115 | ); 116 | runOnlyForDeploymentPostprocessing = 0; 117 | }; 118 | 520683131D6CFBD500160547 /* Headers */ = { 119 | isa = PBXHeadersBuildPhase; 120 | buildActionMask = 2147483647; 121 | files = ( 122 | ); 123 | runOnlyForDeploymentPostprocessing = 0; 124 | }; 125 | 520683201D6CFBDF00160547 /* Headers */ = { 126 | isa = PBXHeadersBuildPhase; 127 | buildActionMask = 2147483647; 128 | files = ( 129 | ); 130 | runOnlyForDeploymentPostprocessing = 0; 131 | }; 132 | /* End PBXHeadersBuildPhase section */ 133 | 134 | /* Begin PBXNativeTarget section */ 135 | 520682FA1D6CFBBB00160547 /* Clockmoji macOS */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = 520683031D6CFBBB00160547 /* Build configuration list for PBXNativeTarget "Clockmoji macOS" */; 138 | buildPhases = ( 139 | 520682F61D6CFBBB00160547 /* Sources */, 140 | 520682F71D6CFBBB00160547 /* Frameworks */, 141 | 520682F81D6CFBBB00160547 /* Headers */, 142 | 520682F91D6CFBBB00160547 /* Resources */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = "Clockmoji macOS"; 149 | productName = "Clockmoji macOS"; 150 | productReference = 520682FB1D6CFBBB00160547 /* Clockmoji.framework */; 151 | productType = "com.apple.product-type.framework"; 152 | }; 153 | 520683081D6CFBC700160547 /* Clockmoji iOS */ = { 154 | isa = PBXNativeTarget; 155 | buildConfigurationList = 5206830E1D6CFBC700160547 /* Build configuration list for PBXNativeTarget "Clockmoji iOS" */; 156 | buildPhases = ( 157 | 520683041D6CFBC700160547 /* Sources */, 158 | 520683051D6CFBC700160547 /* Frameworks */, 159 | 520683061D6CFBC700160547 /* Headers */, 160 | 520683071D6CFBC700160547 /* Resources */, 161 | ); 162 | buildRules = ( 163 | ); 164 | dependencies = ( 165 | ); 166 | name = "Clockmoji iOS"; 167 | productName = "Clockmoji iOS"; 168 | productReference = 520683091D6CFBC700160547 /* Clockmoji.framework */; 169 | productType = "com.apple.product-type.framework"; 170 | }; 171 | 520683151D6CFBD500160547 /* Clockmoji watchOS */ = { 172 | isa = PBXNativeTarget; 173 | buildConfigurationList = 5206831B1D6CFBD500160547 /* Build configuration list for PBXNativeTarget "Clockmoji watchOS" */; 174 | buildPhases = ( 175 | 520683111D6CFBD500160547 /* Sources */, 176 | 520683121D6CFBD500160547 /* Frameworks */, 177 | 520683131D6CFBD500160547 /* Headers */, 178 | 520683141D6CFBD500160547 /* Resources */, 179 | ); 180 | buildRules = ( 181 | ); 182 | dependencies = ( 183 | ); 184 | name = "Clockmoji watchOS"; 185 | productName = "Clockmoji watchOS"; 186 | productReference = 520683161D6CFBD500160547 /* Clockmoji.framework */; 187 | productType = "com.apple.product-type.framework"; 188 | }; 189 | 520683221D6CFBDF00160547 /* Clockmoji tvOS */ = { 190 | isa = PBXNativeTarget; 191 | buildConfigurationList = 520683281D6CFBDF00160547 /* Build configuration list for PBXNativeTarget "Clockmoji tvOS" */; 192 | buildPhases = ( 193 | 5206831E1D6CFBDF00160547 /* Sources */, 194 | 5206831F1D6CFBDF00160547 /* Frameworks */, 195 | 520683201D6CFBDF00160547 /* Headers */, 196 | 520683211D6CFBDF00160547 /* Resources */, 197 | ); 198 | buildRules = ( 199 | ); 200 | dependencies = ( 201 | ); 202 | name = "Clockmoji tvOS"; 203 | productName = "Clockmoji tvOS"; 204 | productReference = 520683231D6CFBDF00160547 /* Clockmoji.framework */; 205 | productType = "com.apple.product-type.framework"; 206 | }; 207 | /* End PBXNativeTarget section */ 208 | 209 | /* Begin PBXProject section */ 210 | 520682F01D6CFB9100160547 /* Project object */ = { 211 | isa = PBXProject; 212 | attributes = { 213 | LastUpgradeCheck = 0800; 214 | TargetAttributes = { 215 | 520682FA1D6CFBBB00160547 = { 216 | CreatedOnToolsVersion = 8.0; 217 | DevelopmentTeam = D97BP28TP2; 218 | LastSwiftMigration = 0800; 219 | ProvisioningStyle = Automatic; 220 | }; 221 | 520683081D6CFBC700160547 = { 222 | CreatedOnToolsVersion = 8.0; 223 | DevelopmentTeam = D97BP28TP2; 224 | LastSwiftMigration = 0800; 225 | ProvisioningStyle = Automatic; 226 | }; 227 | 520683151D6CFBD500160547 = { 228 | CreatedOnToolsVersion = 8.0; 229 | DevelopmentTeam = D97BP28TP2; 230 | LastSwiftMigration = 0800; 231 | ProvisioningStyle = Automatic; 232 | }; 233 | 520683221D6CFBDF00160547 = { 234 | CreatedOnToolsVersion = 8.0; 235 | DevelopmentTeam = D97BP28TP2; 236 | LastSwiftMigration = 0800; 237 | ProvisioningStyle = Automatic; 238 | }; 239 | }; 240 | }; 241 | buildConfigurationList = 520682F31D6CFB9100160547 /* Build configuration list for PBXProject "Clockmoji" */; 242 | compatibilityVersion = "Xcode 3.2"; 243 | developmentRegion = English; 244 | hasScannedForEncodings = 0; 245 | knownRegions = ( 246 | en, 247 | ); 248 | mainGroup = 520682EF1D6CFB9100160547; 249 | productRefGroup = 520682FC1D6CFBBB00160547 /* Products */; 250 | projectDirPath = ""; 251 | projectRoot = ""; 252 | targets = ( 253 | 520682FA1D6CFBBB00160547 /* Clockmoji macOS */, 254 | 520683081D6CFBC700160547 /* Clockmoji iOS */, 255 | 520683151D6CFBD500160547 /* Clockmoji watchOS */, 256 | 520683221D6CFBDF00160547 /* Clockmoji tvOS */, 257 | ); 258 | }; 259 | /* End PBXProject section */ 260 | 261 | /* Begin PBXResourcesBuildPhase section */ 262 | 520682F91D6CFBBB00160547 /* Resources */ = { 263 | isa = PBXResourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | 520683071D6CFBC700160547 /* Resources */ = { 270 | isa = PBXResourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | 520683141D6CFBD500160547 /* Resources */ = { 277 | isa = PBXResourcesBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | }; 283 | 520683211D6CFBDF00160547 /* Resources */ = { 284 | isa = PBXResourcesBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | /* End PBXResourcesBuildPhase section */ 291 | 292 | /* Begin PBXSourcesBuildPhase section */ 293 | 520682F61D6CFBBB00160547 /* Sources */ = { 294 | isa = PBXSourcesBuildPhase; 295 | buildActionMask = 2147483647; 296 | files = ( 297 | 520683301D6CFD6700160547 /* ClockFace.swift in Sources */, 298 | ); 299 | runOnlyForDeploymentPostprocessing = 0; 300 | }; 301 | 520683041D6CFBC700160547 /* Sources */ = { 302 | isa = PBXSourcesBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | 520683311D6CFD6700160547 /* ClockFace.swift in Sources */, 306 | ); 307 | runOnlyForDeploymentPostprocessing = 0; 308 | }; 309 | 520683111D6CFBD500160547 /* Sources */ = { 310 | isa = PBXSourcesBuildPhase; 311 | buildActionMask = 2147483647; 312 | files = ( 313 | 520683321D6CFD6700160547 /* ClockFace.swift in Sources */, 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | }; 317 | 5206831E1D6CFBDF00160547 /* Sources */ = { 318 | isa = PBXSourcesBuildPhase; 319 | buildActionMask = 2147483647; 320 | files = ( 321 | 520683331D6CFD6700160547 /* ClockFace.swift in Sources */, 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | }; 325 | /* End PBXSourcesBuildPhase section */ 326 | 327 | /* Begin XCBuildConfiguration section */ 328 | 520682F41D6CFB9100160547 /* Debug */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | PROJECT_BUNDLE_IDENTIFIER = "com.nikolaivazquez.$(PROJECT_NAME)"; 332 | }; 333 | name = Debug; 334 | }; 335 | 520682F51D6CFB9100160547 /* Release */ = { 336 | isa = XCBuildConfiguration; 337 | buildSettings = { 338 | PROJECT_BUNDLE_IDENTIFIER = "com.nikolaivazquez.$(PROJECT_NAME)"; 339 | }; 340 | name = Release; 341 | }; 342 | 520683011D6CFBBB00160547 /* Debug */ = { 343 | isa = XCBuildConfiguration; 344 | buildSettings = { 345 | ALWAYS_SEARCH_USER_PATHS = NO; 346 | CLANG_ANALYZER_NONNULL = YES; 347 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 348 | CLANG_CXX_LIBRARY = "libc++"; 349 | CLANG_ENABLE_MODULES = YES; 350 | CLANG_ENABLE_OBJC_ARC = YES; 351 | CLANG_WARN_BOOL_CONVERSION = YES; 352 | CLANG_WARN_CONSTANT_CONVERSION = YES; 353 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 354 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 355 | CLANG_WARN_EMPTY_BODY = YES; 356 | CLANG_WARN_ENUM_CONVERSION = YES; 357 | CLANG_WARN_INFINITE_RECURSION = YES; 358 | CLANG_WARN_INT_CONVERSION = YES; 359 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 360 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 361 | CLANG_WARN_UNREACHABLE_CODE = YES; 362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 363 | CODE_SIGN_IDENTITY = "-"; 364 | COMBINE_HIDPI_IMAGES = YES; 365 | COPY_PHASE_STRIP = NO; 366 | CURRENT_PROJECT_VERSION = 1; 367 | DEBUG_INFORMATION_FORMAT = dwarf; 368 | DEFINES_MODULE = YES; 369 | DEVELOPMENT_TEAM = D97BP28TP2; 370 | DYLIB_COMPATIBILITY_VERSION = 1; 371 | DYLIB_CURRENT_VERSION = 1; 372 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 373 | ENABLE_STRICT_OBJC_MSGSEND = YES; 374 | ENABLE_TESTABILITY = YES; 375 | FRAMEWORK_VERSION = A; 376 | GCC_C_LANGUAGE_STANDARD = gnu99; 377 | GCC_DYNAMIC_NO_PIC = NO; 378 | GCC_NO_COMMON_BLOCKS = YES; 379 | GCC_OPTIMIZATION_LEVEL = 0; 380 | GCC_PREPROCESSOR_DEFINITIONS = ( 381 | "DEBUG=1", 382 | "$(inherited)", 383 | ); 384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 386 | GCC_WARN_UNDECLARED_SELECTOR = YES; 387 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 388 | GCC_WARN_UNUSED_FUNCTION = YES; 389 | GCC_WARN_UNUSED_VARIABLE = YES; 390 | INFOPLIST_FILE = "$(SRCROOT)/Clockmoji.xcodeproj/Info.plist"; 391 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 392 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 393 | MACOSX_DEPLOYMENT_TARGET = 10.9; 394 | MTL_ENABLE_DEBUG_INFO = YES; 395 | ONLY_ACTIVE_ARCH = YES; 396 | PRODUCT_BUNDLE_IDENTIFIER = "$(PROJECT_BUNDLE_IDENTIFIER)"; 397 | PRODUCT_NAME = "$(PROJECT_NAME)"; 398 | SDKROOT = macosx; 399 | SKIP_INSTALL = YES; 400 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 401 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 402 | SWIFT_VERSION = 3.0; 403 | VERSIONING_SYSTEM = "apple-generic"; 404 | VERSION_INFO_PREFIX = ""; 405 | }; 406 | name = Debug; 407 | }; 408 | 520683021D6CFBBB00160547 /* Release */ = { 409 | isa = XCBuildConfiguration; 410 | buildSettings = { 411 | ALWAYS_SEARCH_USER_PATHS = NO; 412 | CLANG_ANALYZER_NONNULL = YES; 413 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 414 | CLANG_CXX_LIBRARY = "libc++"; 415 | CLANG_ENABLE_MODULES = YES; 416 | CLANG_ENABLE_OBJC_ARC = YES; 417 | CLANG_WARN_BOOL_CONVERSION = YES; 418 | CLANG_WARN_CONSTANT_CONVERSION = YES; 419 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 420 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 421 | CLANG_WARN_EMPTY_BODY = YES; 422 | CLANG_WARN_ENUM_CONVERSION = YES; 423 | CLANG_WARN_INFINITE_RECURSION = YES; 424 | CLANG_WARN_INT_CONVERSION = YES; 425 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 426 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 427 | CLANG_WARN_UNREACHABLE_CODE = YES; 428 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 429 | CODE_SIGN_IDENTITY = "-"; 430 | COMBINE_HIDPI_IMAGES = YES; 431 | COPY_PHASE_STRIP = NO; 432 | CURRENT_PROJECT_VERSION = 1; 433 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 434 | DEFINES_MODULE = YES; 435 | DEVELOPMENT_TEAM = D97BP28TP2; 436 | DYLIB_COMPATIBILITY_VERSION = 1; 437 | DYLIB_CURRENT_VERSION = 1; 438 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 439 | ENABLE_NS_ASSERTIONS = NO; 440 | ENABLE_STRICT_OBJC_MSGSEND = YES; 441 | FRAMEWORK_VERSION = A; 442 | GCC_C_LANGUAGE_STANDARD = gnu99; 443 | GCC_NO_COMMON_BLOCKS = YES; 444 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 445 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 446 | GCC_WARN_UNDECLARED_SELECTOR = YES; 447 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 448 | GCC_WARN_UNUSED_FUNCTION = YES; 449 | GCC_WARN_UNUSED_VARIABLE = YES; 450 | INFOPLIST_FILE = "$(SRCROOT)/Clockmoji.xcodeproj/Info.plist"; 451 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 453 | MACOSX_DEPLOYMENT_TARGET = 10.9; 454 | MTL_ENABLE_DEBUG_INFO = NO; 455 | PRODUCT_BUNDLE_IDENTIFIER = "$(PROJECT_BUNDLE_IDENTIFIER)"; 456 | PRODUCT_NAME = "$(PROJECT_NAME)"; 457 | SDKROOT = macosx; 458 | SKIP_INSTALL = YES; 459 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 460 | SWIFT_VERSION = 3.0; 461 | VERSIONING_SYSTEM = "apple-generic"; 462 | VERSION_INFO_PREFIX = ""; 463 | }; 464 | name = Release; 465 | }; 466 | 5206830F1D6CFBC700160547 /* Debug */ = { 467 | isa = XCBuildConfiguration; 468 | buildSettings = { 469 | ALWAYS_SEARCH_USER_PATHS = NO; 470 | CLANG_ANALYZER_NONNULL = YES; 471 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 472 | CLANG_CXX_LIBRARY = "libc++"; 473 | CLANG_ENABLE_MODULES = YES; 474 | CLANG_ENABLE_OBJC_ARC = YES; 475 | CLANG_WARN_BOOL_CONVERSION = YES; 476 | CLANG_WARN_CONSTANT_CONVERSION = YES; 477 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 478 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 479 | CLANG_WARN_EMPTY_BODY = YES; 480 | CLANG_WARN_ENUM_CONVERSION = YES; 481 | CLANG_WARN_INFINITE_RECURSION = YES; 482 | CLANG_WARN_INT_CONVERSION = YES; 483 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 484 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 485 | CLANG_WARN_UNREACHABLE_CODE = YES; 486 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 487 | CODE_SIGN_IDENTITY = ""; 488 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 489 | COPY_PHASE_STRIP = NO; 490 | CURRENT_PROJECT_VERSION = 1; 491 | DEBUG_INFORMATION_FORMAT = dwarf; 492 | DEFINES_MODULE = YES; 493 | DEVELOPMENT_TEAM = D97BP28TP2; 494 | DYLIB_COMPATIBILITY_VERSION = 1; 495 | DYLIB_CURRENT_VERSION = 1; 496 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 497 | ENABLE_STRICT_OBJC_MSGSEND = YES; 498 | ENABLE_TESTABILITY = YES; 499 | GCC_C_LANGUAGE_STANDARD = gnu99; 500 | GCC_DYNAMIC_NO_PIC = NO; 501 | GCC_NO_COMMON_BLOCKS = YES; 502 | GCC_OPTIMIZATION_LEVEL = 0; 503 | GCC_PREPROCESSOR_DEFINITIONS = ( 504 | "DEBUG=1", 505 | "$(inherited)", 506 | ); 507 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 508 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 509 | GCC_WARN_UNDECLARED_SELECTOR = YES; 510 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 511 | GCC_WARN_UNUSED_FUNCTION = YES; 512 | GCC_WARN_UNUSED_VARIABLE = YES; 513 | INFOPLIST_FILE = "$(SRCROOT)/Clockmoji.xcodeproj/Info.plist"; 514 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 515 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 516 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 517 | MTL_ENABLE_DEBUG_INFO = YES; 518 | ONLY_ACTIVE_ARCH = YES; 519 | PRODUCT_BUNDLE_IDENTIFIER = "$(PROJECT_BUNDLE_IDENTIFIER)"; 520 | PRODUCT_NAME = "$(PROJECT_NAME)"; 521 | SDKROOT = iphoneos; 522 | SKIP_INSTALL = YES; 523 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 524 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 525 | SWIFT_VERSION = 3.0; 526 | TARGETED_DEVICE_FAMILY = "1,2"; 527 | VERSIONING_SYSTEM = "apple-generic"; 528 | VERSION_INFO_PREFIX = ""; 529 | }; 530 | name = Debug; 531 | }; 532 | 520683101D6CFBC700160547 /* Release */ = { 533 | isa = XCBuildConfiguration; 534 | buildSettings = { 535 | ALWAYS_SEARCH_USER_PATHS = NO; 536 | CLANG_ANALYZER_NONNULL = YES; 537 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 538 | CLANG_CXX_LIBRARY = "libc++"; 539 | CLANG_ENABLE_MODULES = YES; 540 | CLANG_ENABLE_OBJC_ARC = YES; 541 | CLANG_WARN_BOOL_CONVERSION = YES; 542 | CLANG_WARN_CONSTANT_CONVERSION = YES; 543 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 544 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 545 | CLANG_WARN_EMPTY_BODY = YES; 546 | CLANG_WARN_ENUM_CONVERSION = YES; 547 | CLANG_WARN_INFINITE_RECURSION = YES; 548 | CLANG_WARN_INT_CONVERSION = YES; 549 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 550 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 551 | CLANG_WARN_UNREACHABLE_CODE = YES; 552 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 553 | CODE_SIGN_IDENTITY = ""; 554 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 555 | COPY_PHASE_STRIP = NO; 556 | CURRENT_PROJECT_VERSION = 1; 557 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 558 | DEFINES_MODULE = YES; 559 | DEVELOPMENT_TEAM = D97BP28TP2; 560 | DYLIB_COMPATIBILITY_VERSION = 1; 561 | DYLIB_CURRENT_VERSION = 1; 562 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 563 | ENABLE_NS_ASSERTIONS = NO; 564 | ENABLE_STRICT_OBJC_MSGSEND = YES; 565 | GCC_C_LANGUAGE_STANDARD = gnu99; 566 | GCC_NO_COMMON_BLOCKS = YES; 567 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 568 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 569 | GCC_WARN_UNDECLARED_SELECTOR = YES; 570 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 571 | GCC_WARN_UNUSED_FUNCTION = YES; 572 | GCC_WARN_UNUSED_VARIABLE = YES; 573 | INFOPLIST_FILE = "$(SRCROOT)/Clockmoji.xcodeproj/Info.plist"; 574 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 575 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 576 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 577 | MTL_ENABLE_DEBUG_INFO = NO; 578 | PRODUCT_BUNDLE_IDENTIFIER = "$(PROJECT_BUNDLE_IDENTIFIER)"; 579 | PRODUCT_NAME = "$(PROJECT_NAME)"; 580 | SDKROOT = iphoneos; 581 | SKIP_INSTALL = YES; 582 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 583 | SWIFT_VERSION = 3.0; 584 | TARGETED_DEVICE_FAMILY = "1,2"; 585 | VALIDATE_PRODUCT = YES; 586 | VERSIONING_SYSTEM = "apple-generic"; 587 | VERSION_INFO_PREFIX = ""; 588 | }; 589 | name = Release; 590 | }; 591 | 5206831C1D6CFBD500160547 /* Debug */ = { 592 | isa = XCBuildConfiguration; 593 | buildSettings = { 594 | ALWAYS_SEARCH_USER_PATHS = NO; 595 | APPLICATION_EXTENSION_API_ONLY = YES; 596 | CLANG_ANALYZER_NONNULL = YES; 597 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 598 | CLANG_CXX_LIBRARY = "libc++"; 599 | CLANG_ENABLE_MODULES = YES; 600 | CLANG_ENABLE_OBJC_ARC = YES; 601 | CLANG_WARN_BOOL_CONVERSION = YES; 602 | CLANG_WARN_CONSTANT_CONVERSION = YES; 603 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 604 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 605 | CLANG_WARN_EMPTY_BODY = YES; 606 | CLANG_WARN_ENUM_CONVERSION = YES; 607 | CLANG_WARN_INFINITE_RECURSION = YES; 608 | CLANG_WARN_INT_CONVERSION = YES; 609 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 610 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 611 | CLANG_WARN_UNREACHABLE_CODE = YES; 612 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 613 | CODE_SIGN_IDENTITY = ""; 614 | COPY_PHASE_STRIP = NO; 615 | CURRENT_PROJECT_VERSION = 1; 616 | DEBUG_INFORMATION_FORMAT = dwarf; 617 | DEFINES_MODULE = YES; 618 | DEVELOPMENT_TEAM = D97BP28TP2; 619 | DYLIB_COMPATIBILITY_VERSION = 1; 620 | DYLIB_CURRENT_VERSION = 1; 621 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 622 | ENABLE_STRICT_OBJC_MSGSEND = YES; 623 | ENABLE_TESTABILITY = YES; 624 | GCC_C_LANGUAGE_STANDARD = gnu99; 625 | GCC_DYNAMIC_NO_PIC = NO; 626 | GCC_NO_COMMON_BLOCKS = YES; 627 | GCC_OPTIMIZATION_LEVEL = 0; 628 | GCC_PREPROCESSOR_DEFINITIONS = ( 629 | "DEBUG=1", 630 | "$(inherited)", 631 | ); 632 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 633 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 634 | GCC_WARN_UNDECLARED_SELECTOR = YES; 635 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 636 | GCC_WARN_UNUSED_FUNCTION = YES; 637 | GCC_WARN_UNUSED_VARIABLE = YES; 638 | INFOPLIST_FILE = "$(SRCROOT)/Clockmoji.xcodeproj/Info.plist"; 639 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 640 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 641 | MTL_ENABLE_DEBUG_INFO = YES; 642 | ONLY_ACTIVE_ARCH = YES; 643 | PRODUCT_BUNDLE_IDENTIFIER = "$(PROJECT_BUNDLE_IDENTIFIER)"; 644 | PRODUCT_NAME = "$(PROJECT_NAME)"; 645 | SDKROOT = watchos; 646 | SKIP_INSTALL = YES; 647 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 648 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 649 | SWIFT_VERSION = 3.0; 650 | TARGETED_DEVICE_FAMILY = 4; 651 | VERSIONING_SYSTEM = "apple-generic"; 652 | VERSION_INFO_PREFIX = ""; 653 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 654 | }; 655 | name = Debug; 656 | }; 657 | 5206831D1D6CFBD500160547 /* Release */ = { 658 | isa = XCBuildConfiguration; 659 | buildSettings = { 660 | ALWAYS_SEARCH_USER_PATHS = NO; 661 | APPLICATION_EXTENSION_API_ONLY = YES; 662 | CLANG_ANALYZER_NONNULL = YES; 663 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 664 | CLANG_CXX_LIBRARY = "libc++"; 665 | CLANG_ENABLE_MODULES = YES; 666 | CLANG_ENABLE_OBJC_ARC = YES; 667 | CLANG_WARN_BOOL_CONVERSION = YES; 668 | CLANG_WARN_CONSTANT_CONVERSION = YES; 669 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 670 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 671 | CLANG_WARN_EMPTY_BODY = YES; 672 | CLANG_WARN_ENUM_CONVERSION = YES; 673 | CLANG_WARN_INFINITE_RECURSION = YES; 674 | CLANG_WARN_INT_CONVERSION = YES; 675 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 676 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 677 | CLANG_WARN_UNREACHABLE_CODE = YES; 678 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 679 | CODE_SIGN_IDENTITY = ""; 680 | COPY_PHASE_STRIP = NO; 681 | CURRENT_PROJECT_VERSION = 1; 682 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 683 | DEFINES_MODULE = YES; 684 | DEVELOPMENT_TEAM = D97BP28TP2; 685 | DYLIB_COMPATIBILITY_VERSION = 1; 686 | DYLIB_CURRENT_VERSION = 1; 687 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 688 | ENABLE_NS_ASSERTIONS = NO; 689 | ENABLE_STRICT_OBJC_MSGSEND = YES; 690 | GCC_C_LANGUAGE_STANDARD = gnu99; 691 | GCC_NO_COMMON_BLOCKS = YES; 692 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 693 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 694 | GCC_WARN_UNDECLARED_SELECTOR = YES; 695 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 696 | GCC_WARN_UNUSED_FUNCTION = YES; 697 | GCC_WARN_UNUSED_VARIABLE = YES; 698 | INFOPLIST_FILE = "$(SRCROOT)/Clockmoji.xcodeproj/Info.plist"; 699 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 700 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 701 | MTL_ENABLE_DEBUG_INFO = NO; 702 | PRODUCT_BUNDLE_IDENTIFIER = "$(PROJECT_BUNDLE_IDENTIFIER)"; 703 | PRODUCT_NAME = "$(PROJECT_NAME)"; 704 | SDKROOT = watchos; 705 | SKIP_INSTALL = YES; 706 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 707 | SWIFT_VERSION = 3.0; 708 | TARGETED_DEVICE_FAMILY = 4; 709 | VALIDATE_PRODUCT = YES; 710 | VERSIONING_SYSTEM = "apple-generic"; 711 | VERSION_INFO_PREFIX = ""; 712 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 713 | }; 714 | name = Release; 715 | }; 716 | 520683291D6CFBDF00160547 /* Debug */ = { 717 | isa = XCBuildConfiguration; 718 | buildSettings = { 719 | ALWAYS_SEARCH_USER_PATHS = NO; 720 | CLANG_ANALYZER_NONNULL = YES; 721 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 722 | CLANG_CXX_LIBRARY = "libc++"; 723 | CLANG_ENABLE_MODULES = YES; 724 | CLANG_ENABLE_OBJC_ARC = YES; 725 | CLANG_WARN_BOOL_CONVERSION = YES; 726 | CLANG_WARN_CONSTANT_CONVERSION = YES; 727 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 728 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 729 | CLANG_WARN_EMPTY_BODY = YES; 730 | CLANG_WARN_ENUM_CONVERSION = YES; 731 | CLANG_WARN_INFINITE_RECURSION = YES; 732 | CLANG_WARN_INT_CONVERSION = YES; 733 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 734 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 735 | CLANG_WARN_UNREACHABLE_CODE = YES; 736 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 737 | CODE_SIGN_IDENTITY = ""; 738 | COPY_PHASE_STRIP = NO; 739 | CURRENT_PROJECT_VERSION = 1; 740 | DEBUG_INFORMATION_FORMAT = dwarf; 741 | DEFINES_MODULE = YES; 742 | DEVELOPMENT_TEAM = D97BP28TP2; 743 | DYLIB_COMPATIBILITY_VERSION = 1; 744 | DYLIB_CURRENT_VERSION = 1; 745 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 746 | ENABLE_STRICT_OBJC_MSGSEND = YES; 747 | ENABLE_TESTABILITY = YES; 748 | GCC_C_LANGUAGE_STANDARD = gnu99; 749 | GCC_DYNAMIC_NO_PIC = NO; 750 | GCC_NO_COMMON_BLOCKS = YES; 751 | GCC_OPTIMIZATION_LEVEL = 0; 752 | GCC_PREPROCESSOR_DEFINITIONS = ( 753 | "DEBUG=1", 754 | "$(inherited)", 755 | ); 756 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 757 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 758 | GCC_WARN_UNDECLARED_SELECTOR = YES; 759 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 760 | GCC_WARN_UNUSED_FUNCTION = YES; 761 | GCC_WARN_UNUSED_VARIABLE = YES; 762 | INFOPLIST_FILE = "$(SRCROOT)/Clockmoji.xcodeproj/Info.plist"; 763 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 764 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 765 | MTL_ENABLE_DEBUG_INFO = YES; 766 | ONLY_ACTIVE_ARCH = YES; 767 | PRODUCT_BUNDLE_IDENTIFIER = "$(PROJECT_BUNDLE_IDENTIFIER)"; 768 | PRODUCT_NAME = "$(PROJECT_NAME)"; 769 | SDKROOT = appletvos; 770 | SKIP_INSTALL = YES; 771 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 772 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 773 | SWIFT_VERSION = 3.0; 774 | TARGETED_DEVICE_FAMILY = 3; 775 | TVOS_DEPLOYMENT_TARGET = 9.0; 776 | VERSIONING_SYSTEM = "apple-generic"; 777 | VERSION_INFO_PREFIX = ""; 778 | }; 779 | name = Debug; 780 | }; 781 | 5206832A1D6CFBDF00160547 /* Release */ = { 782 | isa = XCBuildConfiguration; 783 | buildSettings = { 784 | ALWAYS_SEARCH_USER_PATHS = NO; 785 | CLANG_ANALYZER_NONNULL = YES; 786 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 787 | CLANG_CXX_LIBRARY = "libc++"; 788 | CLANG_ENABLE_MODULES = YES; 789 | CLANG_ENABLE_OBJC_ARC = YES; 790 | CLANG_WARN_BOOL_CONVERSION = YES; 791 | CLANG_WARN_CONSTANT_CONVERSION = YES; 792 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 793 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 794 | CLANG_WARN_EMPTY_BODY = YES; 795 | CLANG_WARN_ENUM_CONVERSION = YES; 796 | CLANG_WARN_INFINITE_RECURSION = YES; 797 | CLANG_WARN_INT_CONVERSION = YES; 798 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 799 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 800 | CLANG_WARN_UNREACHABLE_CODE = YES; 801 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 802 | CODE_SIGN_IDENTITY = ""; 803 | COPY_PHASE_STRIP = NO; 804 | CURRENT_PROJECT_VERSION = 1; 805 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 806 | DEFINES_MODULE = YES; 807 | DEVELOPMENT_TEAM = D97BP28TP2; 808 | DYLIB_COMPATIBILITY_VERSION = 1; 809 | DYLIB_CURRENT_VERSION = 1; 810 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 811 | ENABLE_NS_ASSERTIONS = NO; 812 | ENABLE_STRICT_OBJC_MSGSEND = YES; 813 | GCC_C_LANGUAGE_STANDARD = gnu99; 814 | GCC_NO_COMMON_BLOCKS = YES; 815 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 816 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 817 | GCC_WARN_UNDECLARED_SELECTOR = YES; 818 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 819 | GCC_WARN_UNUSED_FUNCTION = YES; 820 | GCC_WARN_UNUSED_VARIABLE = YES; 821 | INFOPLIST_FILE = "$(SRCROOT)/Clockmoji.xcodeproj/Info.plist"; 822 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 823 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 824 | MTL_ENABLE_DEBUG_INFO = NO; 825 | PRODUCT_BUNDLE_IDENTIFIER = "$(PROJECT_BUNDLE_IDENTIFIER)"; 826 | PRODUCT_NAME = "$(PROJECT_NAME)"; 827 | SDKROOT = appletvos; 828 | SKIP_INSTALL = YES; 829 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 830 | SWIFT_VERSION = 3.0; 831 | TARGETED_DEVICE_FAMILY = 3; 832 | TVOS_DEPLOYMENT_TARGET = 9.0; 833 | VALIDATE_PRODUCT = YES; 834 | VERSIONING_SYSTEM = "apple-generic"; 835 | VERSION_INFO_PREFIX = ""; 836 | }; 837 | name = Release; 838 | }; 839 | /* End XCBuildConfiguration section */ 840 | 841 | /* Begin XCConfigurationList section */ 842 | 520682F31D6CFB9100160547 /* Build configuration list for PBXProject "Clockmoji" */ = { 843 | isa = XCConfigurationList; 844 | buildConfigurations = ( 845 | 520682F41D6CFB9100160547 /* Debug */, 846 | 520682F51D6CFB9100160547 /* Release */, 847 | ); 848 | defaultConfigurationIsVisible = 0; 849 | defaultConfigurationName = Release; 850 | }; 851 | 520683031D6CFBBB00160547 /* Build configuration list for PBXNativeTarget "Clockmoji macOS" */ = { 852 | isa = XCConfigurationList; 853 | buildConfigurations = ( 854 | 520683011D6CFBBB00160547 /* Debug */, 855 | 520683021D6CFBBB00160547 /* Release */, 856 | ); 857 | defaultConfigurationIsVisible = 0; 858 | defaultConfigurationName = Release; 859 | }; 860 | 5206830E1D6CFBC700160547 /* Build configuration list for PBXNativeTarget "Clockmoji iOS" */ = { 861 | isa = XCConfigurationList; 862 | buildConfigurations = ( 863 | 5206830F1D6CFBC700160547 /* Debug */, 864 | 520683101D6CFBC700160547 /* Release */, 865 | ); 866 | defaultConfigurationIsVisible = 0; 867 | defaultConfigurationName = Release; 868 | }; 869 | 5206831B1D6CFBD500160547 /* Build configuration list for PBXNativeTarget "Clockmoji watchOS" */ = { 870 | isa = XCConfigurationList; 871 | buildConfigurations = ( 872 | 5206831C1D6CFBD500160547 /* Debug */, 873 | 5206831D1D6CFBD500160547 /* Release */, 874 | ); 875 | defaultConfigurationIsVisible = 0; 876 | defaultConfigurationName = Release; 877 | }; 878 | 520683281D6CFBDF00160547 /* Build configuration list for PBXNativeTarget "Clockmoji tvOS" */ = { 879 | isa = XCConfigurationList; 880 | buildConfigurations = ( 881 | 520683291D6CFBDF00160547 /* Debug */, 882 | 5206832A1D6CFBDF00160547 /* Release */, 883 | ); 884 | defaultConfigurationIsVisible = 0; 885 | defaultConfigurationName = Release; 886 | }; 887 | /* End XCConfigurationList section */ 888 | }; 889 | rootObject = 520682F01D6CFB9100160547 /* Project object */; 890 | } 891 | -------------------------------------------------------------------------------- /Clockmoji.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Clockmoji.xcodeproj/xcshareddata/xcschemes/Clockmoji iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Clockmoji.xcodeproj/xcshareddata/xcschemes/Clockmoji macOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Clockmoji.xcodeproj/xcshareddata/xcschemes/Clockmoji tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Clockmoji.xcodeproj/xcshareddata/xcschemes/Clockmoji watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | **Copyright (c) 2016-2017 Nikolai Vazquez** 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Package.swift 3 | // Clockmoji 4 | // 5 | // The MIT License (MIT) 6 | // 7 | // Copyright (c) 2016-2017 Nikolai Vazquez 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | import PackageDescription 29 | 30 | let package = Package( 31 | name: "Clockmoji" 32 | ) 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Clockmoji 2 | 3 | [![Swift 2.2 | 3.0](https://img.shields.io/badge/swift-2.2%20%7C%203.0-orange.svg)](https://developer.apple.com/swift/) 4 | ![Platforms](https://img.shields.io/badge/platform-ios%20%7C%20macos%20%7C%20watchos%20%7C%20tvos%20%7C%20linux-lightgrey.svg) 5 | [![CocoaPods](https://img.shields.io/cocoapods/v/Clockmoji.svg)](https://cocoapods.org/pods/Clockmoji) 6 | [![Carthage](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 7 | [![Swift Package Manager](https://img.shields.io/badge/SPM-compatible-orange.svg)](https://swift.org/package-manager/) 8 | 9 | Simple and intuitive time formatting using clock emoji. 10 | 11 | - [Installation](#installation) 12 | - [Compatibility](#compatibility) 13 | - [Swift Package Manager](#install-using-swift-package-manager) 14 | - [CocoaPods](#install-using-cocoapods) 15 | - [Carthage](#install-using-carthage) 16 | - [Manually](#install-manually) 17 | - [Usage](#usage) 18 | - [Time](#time) 19 | - [Date](#date) 20 | - [Pretty Printing](#pretty-printing) 21 | - [Strideable](#strideable) 22 | - [License](#license) 23 | 24 | ## Installation 25 | 26 | ### Compatibility 27 | 28 | - Platforms: 29 | - macOS 10.9+ 30 | - iOS 8.0+ 31 | - watchOS 2.0+ 32 | - tvOS 9.0+ 33 | - Linux 34 | - Xcode 7.3 and 8.0 beta 6 35 | - Swift 2.2 and 3.0 preview 6 36 | 37 | ### Install Using Swift Package Manager 38 | The [Swift Package Manager](https://swift.org/package-manager/) is a 39 | decentralized dependency manager for Swift. 40 | 41 | 1. Add the project to your `Package.swift`. 42 | 43 | ```swift 44 | import PackageDescription 45 | 46 | let package = Package( 47 | name: "MyAwesomeProject", 48 | dependencies: [ 49 | .Package(url: "https://github.com/nvzqz/Clockmoji.git", 50 | majorVersion: 1) 51 | ] 52 | ) 53 | ``` 54 | 55 | 2. Import the Clockmoji module. 56 | 57 | ```swift 58 | import Clockmoji 59 | ``` 60 | 61 | ### Install Using CocoaPods 62 | [CocoaPods](https://cocoapods.org/) is a centralized dependency manager for 63 | Objective-C and Swift. Go [here](https://guides.cocoapods.org/using/index.html) 64 | to learn more. 65 | 66 | 1. Add the project to your [Podfile](https://guides.cocoapods.org/using/the-podfile.html). 67 | 68 | ```ruby 69 | use_frameworks! 70 | 71 | pod 'Clockmoji', '~> 1.0.0' 72 | ``` 73 | 74 | If you want to be on the bleeding edge, replace the last line with: 75 | 76 | ```ruby 77 | pod 'Clockmoji', :git => 'https://github.com/nvzqz/Clockmoji.git' 78 | ``` 79 | 80 | 2. Run `pod install` and open the `.xcworkspace` file to launch Xcode. 81 | 82 | 3. Import the Clockmoji framework. 83 | 84 | ```swift 85 | import Clockmoji 86 | ``` 87 | 88 | ### Install Using Carthage 89 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency 90 | manager for Objective-C and Swift. 91 | 92 | 1. Add the project to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile). 93 | 94 | ``` 95 | github "nvzqz/Clockmoji" 96 | ``` 97 | 98 | 2. Run `carthage update` and follow [the additional steps](https://github.com/Carthage/Carthage#getting-started) 99 | in order to add Clockmoji to your project. 100 | 101 | 3. Import the Clockmoji framework. 102 | 103 | ```swift 104 | import Clockmoji 105 | ``` 106 | 107 | ### Install Manually 108 | 109 | Simply add the contents of the `Sources` folder into your project. 110 | 111 | ## Usage 112 | 113 | The `ClockFace` enum features twenty-four cases for each clock emoji available. 114 | 115 | ### Time 116 | 117 | A `ClockFace` can be created from a time. 118 | 119 | ```swift 120 | let tenOClock = ClockFace(time: 10) 121 | let sixThirty = ClockFace(time: 6.5) 122 | 123 | /// Rounds down in .5 intervals 124 | let twoSomething = ClockFace(time: 2.4) // two: 🕑 125 | 126 | /// Works with negatives 127 | let twoOClock = ClockFace(time: -10) // equal to twoSomething 128 | 129 | /// Works with large numbers 130 | let crazyFace = ClockFace(time: 42352345432) // four: 🕓 131 | ``` 132 | 133 | The time interval for a `ClockFace` can be easily retrieved using the 134 | `timeInterval` property. 135 | 136 | ### Date 137 | 138 | `ClockFace` can be initialized from a `Date`. 139 | 140 | ```swift 141 | let noon: Date = ... 142 | let face = ClockFace(date: noon) // 🕛 143 | ``` 144 | 145 | A `ClockFace` can also be created from the current date if no date is specified. 146 | 147 | ```swift 148 | let face = ClockFace() // 🕥 149 | ``` 150 | 151 | ### Pretty Printing 152 | 153 | `ClockFace` has multiple properties that make formatting easy. 154 | 155 | Printing a clock face directly will print its raw value. 156 | 157 | ```swift 158 | ClockFace.tenThirty.name // "Ten thirty" 159 | ClockFace.seven.nameWithAdditive // "Seven o'clock" 160 | 161 | ClockFace.two.descriptionWithAdditive // "🕑 o'clock" 162 | ClockFace.oneThirty.descriptionWithAdditive // "🕜" 163 | ``` 164 | 165 | ### Strideable 166 | 167 | `ClockFace` conforms to `Strideable`, allowing it to be used within a countable 168 | range. 169 | 170 | ```swift 171 | for face in ClockFace.one...ClockFace.three { 172 | ... 173 | } 174 | ``` 175 | 176 | The `advanced(by:)` method circles through faces in either a positive or negative direction. 177 | 178 | ```swift 179 | ClockFace.two.advanced(by: 4) == ClockFace.two.advanced(by: 28) 180 | ClockFace.two.advanced(by: 9) == ClockFace.two.advanced(by: -39) 181 | ``` 182 | 183 | ## License 184 | 185 | Clockmoji is published under the [MIT License](https://opensource.org/licenses/MIT). 186 | -------------------------------------------------------------------------------- /Sources/ClockFace.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClockFace.swift 3 | // Clockmoji 4 | // 5 | // The MIT License (MIT) 6 | // 7 | // Copyright (c) 2016-2017 Nikolai Vazquez 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | import Foundation 29 | 30 | /// A clock face with a raw emoji value. 31 | public enum ClockFace: Character, Comparable, Strideable, CustomStringConvertible { 32 | 33 | #if swift(>=3) 34 | 35 | /// One o'clock. 36 | case one = "🕐" 37 | 38 | /// One thirty. 39 | case oneThirty = "🕜" 40 | 41 | /// Two o'clock. 42 | case two = "🕑" 43 | 44 | /// Two thirty. 45 | case twoThirty = "🕝" 46 | 47 | /// Three o'clock. 48 | case three = "🕒" 49 | 50 | /// Three thirty. 51 | case threeThirty = "🕞" 52 | 53 | /// Four o'clock. 54 | case four = "🕓" 55 | 56 | /// Four thirty. 57 | case fourThirty = "🕟" 58 | 59 | /// Five o'clock. 60 | case five = "🕔" 61 | 62 | /// Five thirty. 63 | case fiveThirty = "🕠" 64 | 65 | /// Six o'clock. 66 | case six = "🕕" 67 | 68 | /// Six thirty. 69 | case sixThirty = "🕡" 70 | 71 | /// Seven o'clock. 72 | case seven = "🕖" 73 | 74 | /// Seven thirty. 75 | case sevenThirty = "🕢" 76 | 77 | /// Eight o'clock. 78 | case eight = "🕗" 79 | 80 | /// Eight thirty. 81 | case eightThirty = "🕣" 82 | 83 | /// Nine o'clock. 84 | case nine = "🕘" 85 | 86 | /// Nine thirty. 87 | case nineThirty = "🕤" 88 | 89 | /// Ten o'clock. 90 | case ten = "🕙" 91 | 92 | /// Ten thirty. 93 | case tenThirty = "🕥" 94 | 95 | /// Eleven o'clock. 96 | case eleven = "🕚" 97 | 98 | /// Eleven thirty. 99 | case elevenThirty = "🕦" 100 | 101 | /// Twelve o'clock. 102 | case twelve = "🕛" 103 | 104 | /// Twelve thirty. 105 | case twelveThirty = "🕧" 106 | 107 | /// All clock faces. 108 | public static let all = Array(ClockFace.one...ClockFace.twelveThirty) 109 | 110 | #else 111 | 112 | /// One o'clock. 113 | case One = "🕐" 114 | 115 | /// One thirty. 116 | case OneThirty = "🕜" 117 | 118 | /// Two o'clock. 119 | case Two = "🕑" 120 | 121 | /// Two thirty. 122 | case TwoThirty = "🕝" 123 | 124 | /// Three o'clock. 125 | case Three = "🕒" 126 | 127 | /// Three thirty. 128 | case ThreeThirty = "🕞" 129 | 130 | /// Four o'clock. 131 | case Four = "🕓" 132 | 133 | /// Four thirty. 134 | case FourThirty = "🕟" 135 | 136 | /// Five o'clock. 137 | case Five = "🕔" 138 | 139 | /// Five thirty. 140 | case FiveThirty = "🕠" 141 | 142 | /// Six o'clock. 143 | case Six = "🕕" 144 | 145 | /// Six thirty. 146 | case SixThirty = "🕡" 147 | 148 | /// Seven o'clock. 149 | case Seven = "🕖" 150 | 151 | /// Seven thirty. 152 | case SevenThirty = "🕢" 153 | 154 | /// Eight o'clock. 155 | case Eight = "🕗" 156 | 157 | /// Eight thirty. 158 | case EightThirty = "🕣" 159 | 160 | /// Nine o'clock. 161 | case Nine = "🕘" 162 | 163 | /// Nine thirty. 164 | case NineThirty = "🕤" 165 | 166 | /// Ten o'clock. 167 | case Ten = "🕙" 168 | 169 | /// Ten thirty. 170 | case TenThirty = "🕥" 171 | 172 | /// Eleven o'clock. 173 | case Eleven = "🕚" 174 | 175 | /// Eleven thirty. 176 | case ElevenThirty = "🕦" 177 | 178 | /// Twelve o'clock. 179 | case Twelve = "🕛" 180 | 181 | /// Twelve thirty. 182 | case TwelveThirty = "🕧" 183 | 184 | /// All clock faces. 185 | public static let all = (UInt8(0)..<24).map({ unsafeBitCast($0, ClockFace.self) }) 186 | 187 | #endif 188 | 189 | /// The name bases of all clock faces. 190 | private static let _nameBases = ["One", "Two", "Three", "Four", 191 | "Five", "Six", "Seven", "Eight", 192 | "Nine", "Ten", "Eleven", "Twelve"] 193 | 194 | /// The name for `self`. 195 | public var name: String { 196 | return ClockFace._nameBases[hashValue >> 1] + (isHalfHour ? " thirty" : "") 197 | } 198 | 199 | /// The name for `self` with the "o'clock" additive if `isHour` is `true`. 200 | public var nameWithAdditive: String { 201 | return name + additive 202 | } 203 | 204 | /// A textual representation of this instance. 205 | public var description: String { 206 | return String(rawValue) 207 | } 208 | 209 | /// The description for `self` with the "o'clock" additive if `isHour` is `true`. 210 | public var descriptionWithAdditive: String { 211 | return description + additive 212 | } 213 | 214 | /// The additive for `self`. Is " o'clock" (with the space) if `isHour` is `true`. 215 | public var additive: String { 216 | return isHour ? " o'clock" : "" 217 | } 218 | 219 | /// Whether `self` is a whole hour. 220 | public var isHour: Bool { 221 | return hashValue % 2 == 0 222 | } 223 | 224 | /// Whether `self` is a half hour. 225 | public var isHalfHour: Bool { 226 | return !isHour 227 | } 228 | 229 | /// The time interval for `self`. 230 | public var timeInterval: Double { 231 | return Double(hashValue + 2) * 1800 232 | } 233 | 234 | /// Creates a clock face from `time`. 235 | /// 236 | /// - parameter time: The time in hours for the clock in a 12-hour interval. 237 | public init(time: Double) { 238 | #if swift(>=3) 239 | self = ClockFace.twelve.advanced(by: Int(time * 2)) 240 | #else 241 | self = ClockFace.Twelve.advancedBy(Int(time * 2)) 242 | #endif 243 | } 244 | 245 | /// Creates a clock face from `timeInterval`. 246 | /// 247 | /// - parameter timeInterval: The time interval in seconds for the clock. 248 | public init(timeInterval: Double) { 249 | self.init(time: timeInterval / 3600) 250 | } 251 | 252 | #if swift(>=3) 253 | 254 | /// Creates a clock face from `date` and `calendar`. 255 | /// 256 | /// - parameter date: The date for which to create the clock. The default value is `Date()`. 257 | /// - parameter calendar: The calendar with which to get hours and minutes from `date`. The default value is 258 | /// `current`. 259 | public init(date: Date = Date(), calendar: Calendar = .current) { 260 | let hours = Double(calendar.component(.hour, from: date)) 261 | let minutes = Double(calendar.component(.minute, from: date)) / 60 262 | self.init(time: hours + minutes) 263 | } 264 | 265 | #else 266 | 267 | /// Creates a clock face from `date` and `calendar`. 268 | /// 269 | /// - parameter date: The date for which to create the clock. The default value is `NSDate()`. 270 | /// - parameter calendar: The calendar with which to get hours and minutes from `date`. The default value is 271 | /// `currentCalendar()`. 272 | public init(date: NSDate = NSDate(), calendar: NSCalendar = .currentCalendar()) { 273 | let hours = Double(calendar.component(.Hour, fromDate: date)) 274 | let minutes = Double(calendar.component(.Minute, fromDate: date)) / 60 275 | self.init(time: hours + minutes) 276 | } 277 | 278 | #endif 279 | 280 | #if swift(>=3) 281 | 282 | /// Returns a stride `x` such that `self.advanced(by: x) == other`. 283 | /// 284 | /// - Complexity: O(1). 285 | public func distance(to other: ClockFace) -> Int { 286 | return other.hashValue - self.hashValue 287 | } 288 | 289 | /// Returns a `Self` `x` such that `self.distance(to: x) == n`. 290 | /// 291 | /// - Complexity: O(1). 292 | public func advanced(by n: Int) -> ClockFace { 293 | guard n != 0 else { 294 | return self 295 | } 296 | let advanced: Int = n < 0 297 | ? (hashValue.advanced(by: n % 24) + 24) % 24 298 | : hashValue.advanced(by: n % 24) % 24 299 | return unsafeBitCast(UInt8(advanced), to: ClockFace.self) 300 | } 301 | 302 | #else 303 | 304 | /// Returns a stride `x` such that `self.advancedBy(x) == other`. 305 | /// 306 | /// - Complexity: O(1). 307 | public func distanceTo(other: ClockFace) -> Int { 308 | return other.hashValue - self.hashValue 309 | } 310 | 311 | /// Returns a `Self` `x` such that `self.distanceTo(x) == n`. 312 | /// 313 | /// - Complexity: O(1). 314 | public func advancedBy(n: Int) -> ClockFace { 315 | guard n != 0 else { 316 | return self 317 | } 318 | let advanced: Int = n < 0 319 | ? (hashValue.advancedBy(n % 24) + 24) % 24 320 | : hashValue.advancedBy(n % 24) % 24 321 | return unsafeBitCast(UInt8(advanced), ClockFace.self) 322 | } 323 | 324 | #endif 325 | 326 | } 327 | 328 | /// Returns a Boolean value that indicates whether the first argument is less than the second argument. 329 | public func < (lhs: ClockFace, rhs: ClockFace) -> Bool { 330 | return lhs.hashValue < rhs.hashValue 331 | } 332 | --------------------------------------------------------------------------------