├── .gitignore ├── LICENSE ├── PasscodeStatus ├── PasscodeStatus.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── PasscodeStatus │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m └── PasscodeStatusTests │ ├── Info.plist │ └── PasscodeStatusTests.m ├── README.md ├── Source ├── UIDevice+PasscodeStatus.h └── UIDevice+PasscodeStatus.m └── UIDevice-PasscodeStatus.podspec /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Liam Nichols 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. -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5361F60519B53A3A005E92AD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5361F60419B53A3A005E92AD /* main.m */; }; 11 | 5361F60819B53A3A005E92AD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5361F60719B53A3A005E92AD /* AppDelegate.m */; }; 12 | 5361F60B19B53A3A005E92AD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5361F60A19B53A3A005E92AD /* ViewController.m */; }; 13 | 5361F60E19B53A3A005E92AD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5361F60C19B53A3A005E92AD /* Main.storyboard */; }; 14 | 5361F61019B53A3A005E92AD /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5361F60F19B53A3A005E92AD /* Images.xcassets */; }; 15 | 5361F61C19B53A3A005E92AD /* PasscodeStatusTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5361F61B19B53A3A005E92AD /* PasscodeStatusTests.m */; }; 16 | 5361F62819B53A71005E92AD /* UIDevice+PasscodeStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 5361F62719B53A71005E92AD /* UIDevice+PasscodeStatus.m */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 5361F61619B53A3A005E92AD /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 5361F5F719B53A3A005E92AD /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 5361F5FE19B53A3A005E92AD; 25 | remoteInfo = PasscodeStatus; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 5361F5FF19B53A3A005E92AD /* PasscodeStatus.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PasscodeStatus.app; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 5361F60319B53A3A005E92AD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 5361F60419B53A3A005E92AD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 5361F60619B53A3A005E92AD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 34 | 5361F60719B53A3A005E92AD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 35 | 5361F60919B53A3A005E92AD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 36 | 5361F60A19B53A3A005E92AD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 37 | 5361F60D19B53A3A005E92AD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 38 | 5361F60F19B53A3A005E92AD /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 39 | 5361F61519B53A3A005E92AD /* PasscodeStatusTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PasscodeStatusTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 5361F61A19B53A3A005E92AD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | 5361F61B19B53A3A005E92AD /* PasscodeStatusTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PasscodeStatusTests.m; sourceTree = ""; }; 42 | 5361F62619B53A71005E92AD /* UIDevice+PasscodeStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIDevice+PasscodeStatus.h"; sourceTree = ""; }; 43 | 5361F62719B53A71005E92AD /* UIDevice+PasscodeStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIDevice+PasscodeStatus.m"; sourceTree = ""; }; 44 | /* End PBXFileReference section */ 45 | 46 | /* Begin PBXFrameworksBuildPhase section */ 47 | 5361F5FC19B53A3A005E92AD /* Frameworks */ = { 48 | isa = PBXFrameworksBuildPhase; 49 | buildActionMask = 2147483647; 50 | files = ( 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | 5361F61219B53A3A005E92AD /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 5361F5F619B53A3A005E92AD = { 65 | isa = PBXGroup; 66 | children = ( 67 | 5361F62519B53A63005E92AD /* Source */, 68 | 5361F60119B53A3A005E92AD /* PasscodeStatus */, 69 | 5361F61819B53A3A005E92AD /* PasscodeStatusTests */, 70 | 5361F60019B53A3A005E92AD /* Products */, 71 | ); 72 | sourceTree = ""; 73 | }; 74 | 5361F60019B53A3A005E92AD /* Products */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 5361F5FF19B53A3A005E92AD /* PasscodeStatus.app */, 78 | 5361F61519B53A3A005E92AD /* PasscodeStatusTests.xctest */, 79 | ); 80 | name = Products; 81 | sourceTree = ""; 82 | }; 83 | 5361F60119B53A3A005E92AD /* PasscodeStatus */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 5361F60619B53A3A005E92AD /* AppDelegate.h */, 87 | 5361F60719B53A3A005E92AD /* AppDelegate.m */, 88 | 5361F60919B53A3A005E92AD /* ViewController.h */, 89 | 5361F60A19B53A3A005E92AD /* ViewController.m */, 90 | 5361F60C19B53A3A005E92AD /* Main.storyboard */, 91 | 5361F60F19B53A3A005E92AD /* Images.xcassets */, 92 | 5361F60219B53A3A005E92AD /* Supporting Files */, 93 | ); 94 | path = PasscodeStatus; 95 | sourceTree = ""; 96 | }; 97 | 5361F60219B53A3A005E92AD /* Supporting Files */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 5361F60319B53A3A005E92AD /* Info.plist */, 101 | 5361F60419B53A3A005E92AD /* main.m */, 102 | ); 103 | name = "Supporting Files"; 104 | sourceTree = ""; 105 | }; 106 | 5361F61819B53A3A005E92AD /* PasscodeStatusTests */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 5361F61B19B53A3A005E92AD /* PasscodeStatusTests.m */, 110 | 5361F61919B53A3A005E92AD /* Supporting Files */, 111 | ); 112 | path = PasscodeStatusTests; 113 | sourceTree = ""; 114 | }; 115 | 5361F61919B53A3A005E92AD /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 5361F61A19B53A3A005E92AD /* Info.plist */, 119 | ); 120 | name = "Supporting Files"; 121 | sourceTree = ""; 122 | }; 123 | 5361F62519B53A63005E92AD /* Source */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 5361F62619B53A71005E92AD /* UIDevice+PasscodeStatus.h */, 127 | 5361F62719B53A71005E92AD /* UIDevice+PasscodeStatus.m */, 128 | ); 129 | name = Source; 130 | path = ../Source; 131 | sourceTree = ""; 132 | }; 133 | /* End PBXGroup section */ 134 | 135 | /* Begin PBXNativeTarget section */ 136 | 5361F5FE19B53A3A005E92AD /* PasscodeStatus */ = { 137 | isa = PBXNativeTarget; 138 | buildConfigurationList = 5361F61F19B53A3A005E92AD /* Build configuration list for PBXNativeTarget "PasscodeStatus" */; 139 | buildPhases = ( 140 | 5361F5FB19B53A3A005E92AD /* Sources */, 141 | 5361F5FC19B53A3A005E92AD /* Frameworks */, 142 | 5361F5FD19B53A3A005E92AD /* Resources */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = PasscodeStatus; 149 | productName = PasscodeStatus; 150 | productReference = 5361F5FF19B53A3A005E92AD /* PasscodeStatus.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | 5361F61419B53A3A005E92AD /* PasscodeStatusTests */ = { 154 | isa = PBXNativeTarget; 155 | buildConfigurationList = 5361F62219B53A3A005E92AD /* Build configuration list for PBXNativeTarget "PasscodeStatusTests" */; 156 | buildPhases = ( 157 | 5361F61119B53A3A005E92AD /* Sources */, 158 | 5361F61219B53A3A005E92AD /* Frameworks */, 159 | 5361F61319B53A3A005E92AD /* Resources */, 160 | ); 161 | buildRules = ( 162 | ); 163 | dependencies = ( 164 | 5361F61719B53A3A005E92AD /* PBXTargetDependency */, 165 | ); 166 | name = PasscodeStatusTests; 167 | productName = PasscodeStatusTests; 168 | productReference = 5361F61519B53A3A005E92AD /* PasscodeStatusTests.xctest */; 169 | productType = "com.apple.product-type.bundle.unit-test"; 170 | }; 171 | /* End PBXNativeTarget section */ 172 | 173 | /* Begin PBXProject section */ 174 | 5361F5F719B53A3A005E92AD /* Project object */ = { 175 | isa = PBXProject; 176 | attributes = { 177 | LastUpgradeCheck = 0600; 178 | ORGANIZATIONNAME = "Liam Nichols"; 179 | TargetAttributes = { 180 | 5361F5FE19B53A3A005E92AD = { 181 | CreatedOnToolsVersion = 6.0; 182 | }; 183 | 5361F61419B53A3A005E92AD = { 184 | CreatedOnToolsVersion = 6.0; 185 | TestTargetID = 5361F5FE19B53A3A005E92AD; 186 | }; 187 | }; 188 | }; 189 | buildConfigurationList = 5361F5FA19B53A3A005E92AD /* Build configuration list for PBXProject "PasscodeStatus" */; 190 | compatibilityVersion = "Xcode 3.2"; 191 | developmentRegion = English; 192 | hasScannedForEncodings = 0; 193 | knownRegions = ( 194 | en, 195 | Base, 196 | ); 197 | mainGroup = 5361F5F619B53A3A005E92AD; 198 | productRefGroup = 5361F60019B53A3A005E92AD /* Products */; 199 | projectDirPath = ""; 200 | projectRoot = ""; 201 | targets = ( 202 | 5361F5FE19B53A3A005E92AD /* PasscodeStatus */, 203 | 5361F61419B53A3A005E92AD /* PasscodeStatusTests */, 204 | ); 205 | }; 206 | /* End PBXProject section */ 207 | 208 | /* Begin PBXResourcesBuildPhase section */ 209 | 5361F5FD19B53A3A005E92AD /* Resources */ = { 210 | isa = PBXResourcesBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | 5361F60E19B53A3A005E92AD /* Main.storyboard in Resources */, 214 | 5361F61019B53A3A005E92AD /* Images.xcassets in Resources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | 5361F61319B53A3A005E92AD /* Resources */ = { 219 | isa = PBXResourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXResourcesBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | 5361F5FB19B53A3A005E92AD /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 5361F60B19B53A3A005E92AD /* ViewController.m in Sources */, 233 | 5361F60819B53A3A005E92AD /* AppDelegate.m in Sources */, 234 | 5361F60519B53A3A005E92AD /* main.m in Sources */, 235 | 5361F62819B53A71005E92AD /* UIDevice+PasscodeStatus.m in Sources */, 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | 5361F61119B53A3A005E92AD /* Sources */ = { 240 | isa = PBXSourcesBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | 5361F61C19B53A3A005E92AD /* PasscodeStatusTests.m in Sources */, 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | /* End PBXSourcesBuildPhase section */ 248 | 249 | /* Begin PBXTargetDependency section */ 250 | 5361F61719B53A3A005E92AD /* PBXTargetDependency */ = { 251 | isa = PBXTargetDependency; 252 | target = 5361F5FE19B53A3A005E92AD /* PasscodeStatus */; 253 | targetProxy = 5361F61619B53A3A005E92AD /* PBXContainerItemProxy */; 254 | }; 255 | /* End PBXTargetDependency section */ 256 | 257 | /* Begin PBXVariantGroup section */ 258 | 5361F60C19B53A3A005E92AD /* Main.storyboard */ = { 259 | isa = PBXVariantGroup; 260 | children = ( 261 | 5361F60D19B53A3A005E92AD /* Base */, 262 | ); 263 | name = Main.storyboard; 264 | sourceTree = ""; 265 | }; 266 | /* End PBXVariantGroup section */ 267 | 268 | /* Begin XCBuildConfiguration section */ 269 | 5361F61D19B53A3A005E92AD /* Debug */ = { 270 | isa = XCBuildConfiguration; 271 | buildSettings = { 272 | ALWAYS_SEARCH_USER_PATHS = NO; 273 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 274 | CLANG_CXX_LIBRARY = "libc++"; 275 | CLANG_ENABLE_MODULES = YES; 276 | CLANG_ENABLE_OBJC_ARC = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_CONSTANT_CONVERSION = YES; 279 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 280 | CLANG_WARN_EMPTY_BODY = YES; 281 | CLANG_WARN_ENUM_CONVERSION = YES; 282 | CLANG_WARN_INT_CONVERSION = YES; 283 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 284 | CLANG_WARN_UNREACHABLE_CODE = YES; 285 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 286 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 287 | COPY_PHASE_STRIP = NO; 288 | ENABLE_STRICT_OBJC_MSGSEND = YES; 289 | GCC_C_LANGUAGE_STANDARD = gnu99; 290 | GCC_DYNAMIC_NO_PIC = NO; 291 | GCC_OPTIMIZATION_LEVEL = 0; 292 | GCC_PREPROCESSOR_DEFINITIONS = ( 293 | "DEBUG=1", 294 | "$(inherited)", 295 | ); 296 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 297 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 298 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 299 | GCC_WARN_UNDECLARED_SELECTOR = YES; 300 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 301 | GCC_WARN_UNUSED_FUNCTION = YES; 302 | GCC_WARN_UNUSED_VARIABLE = YES; 303 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 304 | MTL_ENABLE_DEBUG_INFO = YES; 305 | ONLY_ACTIVE_ARCH = YES; 306 | SDKROOT = iphoneos; 307 | TARGETED_DEVICE_FAMILY = "1,2"; 308 | }; 309 | name = Debug; 310 | }; 311 | 5361F61E19B53A3A005E92AD /* Release */ = { 312 | isa = XCBuildConfiguration; 313 | buildSettings = { 314 | ALWAYS_SEARCH_USER_PATHS = NO; 315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 316 | CLANG_CXX_LIBRARY = "libc++"; 317 | CLANG_ENABLE_MODULES = YES; 318 | CLANG_ENABLE_OBJC_ARC = YES; 319 | CLANG_WARN_BOOL_CONVERSION = YES; 320 | CLANG_WARN_CONSTANT_CONVERSION = YES; 321 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 322 | CLANG_WARN_EMPTY_BODY = YES; 323 | CLANG_WARN_ENUM_CONVERSION = YES; 324 | CLANG_WARN_INT_CONVERSION = YES; 325 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 326 | CLANG_WARN_UNREACHABLE_CODE = YES; 327 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 328 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 329 | COPY_PHASE_STRIP = YES; 330 | ENABLE_NS_ASSERTIONS = NO; 331 | ENABLE_STRICT_OBJC_MSGSEND = YES; 332 | GCC_C_LANGUAGE_STANDARD = gnu99; 333 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 334 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 335 | GCC_WARN_UNDECLARED_SELECTOR = YES; 336 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 337 | GCC_WARN_UNUSED_FUNCTION = YES; 338 | GCC_WARN_UNUSED_VARIABLE = YES; 339 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 340 | MTL_ENABLE_DEBUG_INFO = NO; 341 | SDKROOT = iphoneos; 342 | TARGETED_DEVICE_FAMILY = "1,2"; 343 | VALIDATE_PRODUCT = YES; 344 | }; 345 | name = Release; 346 | }; 347 | 5361F62019B53A3A005E92AD /* Debug */ = { 348 | isa = XCBuildConfiguration; 349 | buildSettings = { 350 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 351 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 352 | INFOPLIST_FILE = PasscodeStatus/Info.plist; 353 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 354 | PRODUCT_NAME = "$(TARGET_NAME)"; 355 | }; 356 | name = Debug; 357 | }; 358 | 5361F62119B53A3A005E92AD /* Release */ = { 359 | isa = XCBuildConfiguration; 360 | buildSettings = { 361 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 362 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 363 | INFOPLIST_FILE = PasscodeStatus/Info.plist; 364 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 365 | PRODUCT_NAME = "$(TARGET_NAME)"; 366 | }; 367 | name = Release; 368 | }; 369 | 5361F62319B53A3A005E92AD /* Debug */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | BUNDLE_LOADER = "$(TEST_HOST)"; 373 | FRAMEWORK_SEARCH_PATHS = ( 374 | "$(SDKROOT)/Developer/Library/Frameworks", 375 | "$(inherited)", 376 | ); 377 | GCC_PREPROCESSOR_DEFINITIONS = ( 378 | "DEBUG=1", 379 | "$(inherited)", 380 | ); 381 | INFOPLIST_FILE = PasscodeStatusTests/Info.plist; 382 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 383 | PRODUCT_NAME = "$(TARGET_NAME)"; 384 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PasscodeStatus.app/PasscodeStatus"; 385 | }; 386 | name = Debug; 387 | }; 388 | 5361F62419B53A3A005E92AD /* Release */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | BUNDLE_LOADER = "$(TEST_HOST)"; 392 | FRAMEWORK_SEARCH_PATHS = ( 393 | "$(SDKROOT)/Developer/Library/Frameworks", 394 | "$(inherited)", 395 | ); 396 | INFOPLIST_FILE = PasscodeStatusTests/Info.plist; 397 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 398 | PRODUCT_NAME = "$(TARGET_NAME)"; 399 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PasscodeStatus.app/PasscodeStatus"; 400 | }; 401 | name = Release; 402 | }; 403 | /* End XCBuildConfiguration section */ 404 | 405 | /* Begin XCConfigurationList section */ 406 | 5361F5FA19B53A3A005E92AD /* Build configuration list for PBXProject "PasscodeStatus" */ = { 407 | isa = XCConfigurationList; 408 | buildConfigurations = ( 409 | 5361F61D19B53A3A005E92AD /* Debug */, 410 | 5361F61E19B53A3A005E92AD /* Release */, 411 | ); 412 | defaultConfigurationIsVisible = 0; 413 | defaultConfigurationName = Release; 414 | }; 415 | 5361F61F19B53A3A005E92AD /* Build configuration list for PBXNativeTarget "PasscodeStatus" */ = { 416 | isa = XCConfigurationList; 417 | buildConfigurations = ( 418 | 5361F62019B53A3A005E92AD /* Debug */, 419 | 5361F62119B53A3A005E92AD /* Release */, 420 | ); 421 | defaultConfigurationIsVisible = 0; 422 | }; 423 | 5361F62219B53A3A005E92AD /* Build configuration list for PBXNativeTarget "PasscodeStatusTests" */ = { 424 | isa = XCConfigurationList; 425 | buildConfigurations = ( 426 | 5361F62319B53A3A005E92AD /* Debug */, 427 | 5361F62419B53A3A005E92AD /* Release */, 428 | ); 429 | defaultConfigurationIsVisible = 0; 430 | }; 431 | /* End XCConfigurationList section */ 432 | }; 433 | rootObject = 5361F5F719B53A3A005E92AD /* Project object */; 434 | } 435 | -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // PasscodeStatus 4 | // 5 | // Created by Liam Nichols on 02/09/2014. 6 | // Copyright (c) 2014 Liam Nichols. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // PasscodeStatus 4 | // 5 | // Created by Liam Nichols on 02/09/2014. 6 | // Copyright (c) 2014 Liam Nichols. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.liamnichols.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 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 | -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // PasscodeStatus 4 | // 5 | // Created by Liam Nichols on 02/09/2014. 6 | // Copyright (c) 2014 Liam Nichols. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @property (nonatomic, strong) IBOutlet UILabel *statusLabel; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // PasscodeStatus 4 | // 5 | // Created by Liam Nichols on 02/09/2014. 6 | // Copyright (c) 2014 Liam Nichols. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UIDevice+PasscodeStatus.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController { 17 | id notificationToken; 18 | } 19 | 20 | - (void)viewDidLoad 21 | { 22 | [super viewDidLoad]; 23 | 24 | [self checkPasscodeState]; 25 | notificationToken = [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidBecomeActiveNotification object:nil queue:nil usingBlock:^(NSNotification *note) { 26 | [self checkPasscodeState]; 27 | }]; 28 | } 29 | 30 | - (void)dealloc 31 | { 32 | if (notificationToken) { 33 | [[NSNotificationCenter defaultCenter] removeObserver:notificationToken]; 34 | notificationToken = nil; 35 | } 36 | } 37 | 38 | - (void)checkPasscodeState 39 | { 40 | LNPasscodeStatus status = [UIDevice currentDevice].passcodeStatus; 41 | switch (status) { 42 | case LNPasscodeStatusEnabled: 43 | self.view.backgroundColor = [UIColor greenColor]; 44 | self.statusLabel.text = @"Passcode Enabled"; 45 | break; 46 | 47 | case LNPasscodeStatusDisabled: 48 | self.view.backgroundColor = [UIColor redColor]; 49 | self.statusLabel.text = @"Passcode Disabled"; 50 | break; 51 | 52 | case LNPasscodeStatusUnknown: 53 | default: 54 | self.view.backgroundColor = [UIColor lightGrayColor]; 55 | self.statusLabel.text = @"Unable to determine passcode state"; 56 | break; 57 | } 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatus/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PasscodeStatus 4 | // 5 | // Created by Liam Nichols on 02/09/2014. 6 | // Copyright (c) 2014 Liam Nichols. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatusTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.liamnichols.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /PasscodeStatus/PasscodeStatusTests/PasscodeStatusTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // PasscodeStatusTests.m 3 | // PasscodeStatusTests 4 | // 5 | // Created by Liam Nichols on 02/09/2014. 6 | // Copyright (c) 2014 Liam Nichols. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface PasscodeStatusTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation PasscodeStatusTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | UIDevice-PasscodeStatus 2 | ======================= 3 | 4 | # Update 5 | 6 | As of iOS 9, you can achieve this using the `LocalAuthentication.framework`. If targeting iOS 9+ read the comments [here][1] or look at [this answer][2]. 7 | 8 | If you still need to target iOS 8 then continue reading :) 9 | 10 | ---------- 11 | 12 | A UIDevice category to determine if the passcode is currently set on the device or not. 13 | 14 | Requirements 15 | -- 16 | - iOS 8 17 | - A Physical Device 18 | 19 | How it Works 20 | -- 21 | This category works by using the new accessControl features added to the Security.Framework in iOS 8. 22 | It attempts to add an item to the keychain using the `kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly` protection level. 23 | 24 | The documentation states the following: 25 | 26 | > Item data can only be accessed while the device is unlocked. This class is only 27 | available if a passcode is set on the device. This is recommended for 28 | items that only need to be accessible while the application is in the 29 | foreground. Items with this attribute will never migrate to a new 30 | device, so after a backup is restored to a new device, these items 31 | will be missing. **No items can be stored in this class on devices 32 | without a passcode.** Disabling the device passcode will cause all 33 | items in this class to be deleted. 34 | 35 | Because of this, an error is returned when you attempt to add or read an item in the keychain with this level of accessControl. If we see this error, the `passcodeStatus` returns as `LNPasscodeStatusDisabled`. 36 | If we can successfully read or write to the keychain with this level of accessControl then we return `LNPasscodeStatusEnabled`. 37 | 38 | If the device is unsupported or an unrelated error with the keychain is returned, we return `LNPasscodeStatusUnknown`. 39 | 40 | Installation 41 | - 42 | **CocoaPods:** 43 | `pod 'UIDevice-PasscodeStatus', '~> 0.0.2'` 44 | 45 | **Manually:** 46 | Just copy the category from the `Source/` directory into your project and import `Security.Framework` 47 | 48 | 49 | 50 | [1]: https://github.com/liamnichols/UIDevice-PasscodeStatus/issues/3#issuecomment-190294010 51 | [2]: http://stackoverflow.com/a/36708769/814389 52 | -------------------------------------------------------------------------------- /Source/UIDevice+PasscodeStatus.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+PasscodeStatus.h 3 | // PasscodeStatus 4 | // 5 | // Created by Liam Nichols on 02/09/2014. 6 | // Copyright (c) 2014 Liam Nichols. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSUInteger, LNPasscodeStatus){ 12 | /* The passcode status was unknown */ 13 | LNPasscodeStatusUnknown = 0, 14 | /* The passcode is enabled */ 15 | LNPasscodeStatusEnabled = 1, 16 | /* The passcode is disabled */ 17 | LNPasscodeStatusDisabled = 2 18 | }; 19 | 20 | @interface UIDevice (PasscodeStatus) 21 | 22 | /** 23 | * Determines if the device supports the `passcodeStatus` check. Passcode check is only supported on iOS 8. 24 | */ 25 | @property (readonly) BOOL passcodeStatusSupported; 26 | 27 | /** 28 | * Checks and returns the devices current passcode status. 29 | * If `passcodeStatusSupported` returns NO then `LNPasscodeStatusUnknown` will be returned. 30 | */ 31 | @property (readonly) LNPasscodeStatus passcodeStatus; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Source/UIDevice+PasscodeStatus.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+PasscodeStatus.m 3 | // PasscodeStatus 4 | // 5 | // Created by Liam Nichols on 02/09/2014. 6 | // Copyright (c) 2014 Liam Nichols. All rights reserved. 7 | // 8 | 9 | #import "UIDevice+PasscodeStatus.h" 10 | #import 11 | 12 | NSString * const UIDevicePasscodeKeychainService = @"UIDevice-PasscodeStatus_KeychainService"; 13 | NSString * const UIDevicePasscodeKeychainAccount = @"UIDevice-PasscodeStatus_KeychainAccount"; 14 | 15 | @implementation UIDevice (PasscodeStatus) 16 | 17 | - (BOOL)passcodeStatusSupported 18 | { 19 | #if TARGET_IPHONE_SIMULATOR 20 | return NO; 21 | #endif 22 | 23 | #ifdef __IPHONE_8_0 24 | return (&kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly != NULL); 25 | #else 26 | return NO; 27 | #endif 28 | } 29 | 30 | - (LNPasscodeStatus)passcodeStatus 31 | { 32 | #if TARGET_IPHONE_SIMULATOR 33 | NSLog(@"-[%@ %@] - not supported in simulator", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); 34 | return LNPasscodeStatusUnknown; 35 | #endif 36 | 37 | #ifdef __IPHONE_8_0 38 | if (&kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly != NULL) { 39 | 40 | static NSData *password = nil; 41 | static dispatch_once_t onceToken; 42 | dispatch_once(&onceToken, ^{ 43 | password = [NSKeyedArchiver archivedDataWithRootObject:NSStringFromSelector(_cmd)]; 44 | }); 45 | 46 | NSDictionary *query = @{ 47 | (__bridge id)kSecClass: (__bridge id)kSecClassGenericPassword, 48 | (__bridge id)kSecAttrService: UIDevicePasscodeKeychainService, 49 | (__bridge id)kSecAttrAccount: UIDevicePasscodeKeychainAccount, 50 | (__bridge id)kSecReturnData: @YES, 51 | }; 52 | 53 | CFErrorRef sacError = NULL; 54 | SecAccessControlRef sacObject; 55 | sacObject = SecAccessControlCreateWithFlags(kCFAllocatorDefault, kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly, kNilOptions, &sacError); 56 | 57 | // unable to create the access control item. 58 | if (sacObject == NULL || sacError != NULL) { 59 | return LNPasscodeStatusUnknown; 60 | } 61 | 62 | 63 | NSMutableDictionary *setQuery = [query mutableCopy]; 64 | setQuery[(__bridge id) kSecValueData] = password; 65 | setQuery[(__bridge id) kSecAttrAccessControl] = (__bridge id) sacObject; 66 | 67 | OSStatus status; 68 | status = SecItemAdd((__bridge CFDictionaryRef)setQuery, NULL); 69 | 70 | // if we have the object, release it. 71 | if (sacObject) { 72 | CFRelease(sacObject); 73 | sacObject = NULL; 74 | } 75 | // if it failed to add the item. 76 | if (status == errSecDecode) { 77 | return LNPasscodeStatusDisabled; 78 | } 79 | 80 | status = SecItemCopyMatching((__bridge CFDictionaryRef)query, NULL); 81 | 82 | // it managed to retrieve data successfully 83 | if (status == errSecSuccess) { 84 | return LNPasscodeStatusEnabled; 85 | } 86 | 87 | // not sure what happened, returning unknown 88 | return LNPasscodeStatusUnknown; 89 | 90 | } else { 91 | return LNPasscodeStatusUnknown; 92 | } 93 | #else 94 | return LNPasscodeStatusUnknown; 95 | #endif 96 | } 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /UIDevice-PasscodeStatus.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint UIDevice-PasscodeStatus.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | 13 | s.name = "UIDevice-PasscodeStatus" 14 | s.version = "0.0.2" 15 | s.summary = "A UIDevice category to determine if the passcode is currently set on the device or not." 16 | 17 | 18 | s.homepage = "https://github.com/liamnichols/UIDevice-PasscodeStatus" 19 | 20 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 21 | 22 | s.license = { :type => "MIT", :file => "LICENSE" } 23 | 24 | 25 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 26 | 27 | s.author = { "Liam Nichols" => "liam.nichols.ln@gmail.com" } 28 | s.social_media_url = "http://twitter.com/liamnichols_" 29 | 30 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 31 | 32 | s.platform = :ios 33 | 34 | 35 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 36 | 37 | s.source = { :git => 'https://github.com/liamnichols/UIDevice-PasscodeStatus.git', :tag => "#{s.version}" } 38 | 39 | 40 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 41 | 42 | s.source_files = "Source/*.{h,m}" 43 | 44 | 45 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 46 | 47 | s.framework = "Security" 48 | 49 | 50 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 51 | 52 | s.requires_arc = true 53 | 54 | end 55 | --------------------------------------------------------------------------------