├── .gitignore ├── .travis.yml ├── Carthage ├── ZKUDID.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── ZKUDID.xcscheme └── ZKUDID │ └── Info.plist ├── Demo ├── Demo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Demo.xcscheme └── Demo │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Demo.entitlements │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── LICENSE ├── README.md ├── ZKUDID.podspec └── ZKUDID ├── ZKUDID.h └── ZKUDID.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | xcode_project: Demo/Demo.xcodeproj 3 | xcode_scheme: Demo 4 | 5 | script: 6 | - xctool -project Demo/Demo.xcodeproj -scheme Demo build test -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO 7 | -------------------------------------------------------------------------------- /Carthage/ZKUDID.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 043C38691E9B26F900531954 /* ZKUDID.h in Headers */ = {isa = PBXBuildFile; fileRef = 043C38671E9B26F900531954 /* ZKUDID.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 043C386A1E9B26F900531954 /* ZKUDID.m in Sources */ = {isa = PBXBuildFile; fileRef = 043C38681E9B26F900531954 /* ZKUDID.m */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 041B7A2B1E97A06600C1E135 /* ZKUDID.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ZKUDID.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 16 | 041B7A2F1E97A06600C1E135 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 17 | 043C38671E9B26F900531954 /* ZKUDID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZKUDID.h; sourceTree = ""; }; 18 | 043C38681E9B26F900531954 /* ZKUDID.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZKUDID.m; sourceTree = ""; }; 19 | /* End PBXFileReference section */ 20 | 21 | /* Begin PBXFrameworksBuildPhase section */ 22 | 041B7A271E97A06600C1E135 /* Frameworks */ = { 23 | isa = PBXFrameworksBuildPhase; 24 | buildActionMask = 2147483647; 25 | files = ( 26 | ); 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXFrameworksBuildPhase section */ 30 | 31 | /* Begin PBXGroup section */ 32 | 041B7A211E97A06600C1E135 = { 33 | isa = PBXGroup; 34 | children = ( 35 | 041B7A2D1E97A06600C1E135 /* ZKUDID */, 36 | 041B7A2C1E97A06600C1E135 /* Products */, 37 | ); 38 | sourceTree = ""; 39 | }; 40 | 041B7A2C1E97A06600C1E135 /* Products */ = { 41 | isa = PBXGroup; 42 | children = ( 43 | 041B7A2B1E97A06600C1E135 /* ZKUDID.framework */, 44 | ); 45 | name = Products; 46 | sourceTree = ""; 47 | }; 48 | 041B7A2D1E97A06600C1E135 /* ZKUDID */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | 043C38661E9B26F900531954 /* ZKUDID */, 52 | 041B7A2F1E97A06600C1E135 /* Info.plist */, 53 | ); 54 | path = ZKUDID; 55 | sourceTree = ""; 56 | }; 57 | 043C38661E9B26F900531954 /* ZKUDID */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 043C38671E9B26F900531954 /* ZKUDID.h */, 61 | 043C38681E9B26F900531954 /* ZKUDID.m */, 62 | ); 63 | name = ZKUDID; 64 | path = ../../ZKUDID; 65 | sourceTree = ""; 66 | }; 67 | /* End PBXGroup section */ 68 | 69 | /* Begin PBXHeadersBuildPhase section */ 70 | 041B7A281E97A06600C1E135 /* Headers */ = { 71 | isa = PBXHeadersBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | 043C38691E9B26F900531954 /* ZKUDID.h in Headers */, 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | /* End PBXHeadersBuildPhase section */ 79 | 80 | /* Begin PBXNativeTarget section */ 81 | 041B7A2A1E97A06600C1E135 /* ZKUDID */ = { 82 | isa = PBXNativeTarget; 83 | buildConfigurationList = 041B7A331E97A06600C1E135 /* Build configuration list for PBXNativeTarget "ZKUDID" */; 84 | buildPhases = ( 85 | 041B7A261E97A06600C1E135 /* Sources */, 86 | 041B7A271E97A06600C1E135 /* Frameworks */, 87 | 041B7A281E97A06600C1E135 /* Headers */, 88 | 041B7A291E97A06600C1E135 /* Resources */, 89 | ); 90 | buildRules = ( 91 | ); 92 | dependencies = ( 93 | ); 94 | name = ZKUDID; 95 | productName = ZKUDID; 96 | productReference = 041B7A2B1E97A06600C1E135 /* ZKUDID.framework */; 97 | productType = "com.apple.product-type.framework"; 98 | }; 99 | /* End PBXNativeTarget section */ 100 | 101 | /* Begin PBXProject section */ 102 | 041B7A221E97A06600C1E135 /* Project object */ = { 103 | isa = PBXProject; 104 | attributes = { 105 | LastUpgradeCheck = 0820; 106 | ORGANIZATIONNAME = mushank; 107 | TargetAttributes = { 108 | 041B7A2A1E97A06600C1E135 = { 109 | CreatedOnToolsVersion = 8.2.1; 110 | ProvisioningStyle = Automatic; 111 | }; 112 | }; 113 | }; 114 | buildConfigurationList = 041B7A251E97A06600C1E135 /* Build configuration list for PBXProject "ZKUDID" */; 115 | compatibilityVersion = "Xcode 3.2"; 116 | developmentRegion = English; 117 | hasScannedForEncodings = 0; 118 | knownRegions = ( 119 | en, 120 | ); 121 | mainGroup = 041B7A211E97A06600C1E135; 122 | productRefGroup = 041B7A2C1E97A06600C1E135 /* Products */; 123 | projectDirPath = ""; 124 | projectRoot = ""; 125 | targets = ( 126 | 041B7A2A1E97A06600C1E135 /* ZKUDID */, 127 | ); 128 | }; 129 | /* End PBXProject section */ 130 | 131 | /* Begin PBXResourcesBuildPhase section */ 132 | 041B7A291E97A06600C1E135 /* Resources */ = { 133 | isa = PBXResourcesBuildPhase; 134 | buildActionMask = 2147483647; 135 | files = ( 136 | ); 137 | runOnlyForDeploymentPostprocessing = 0; 138 | }; 139 | /* End PBXResourcesBuildPhase section */ 140 | 141 | /* Begin PBXSourcesBuildPhase section */ 142 | 041B7A261E97A06600C1E135 /* Sources */ = { 143 | isa = PBXSourcesBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | 043C386A1E9B26F900531954 /* ZKUDID.m in Sources */, 147 | ); 148 | runOnlyForDeploymentPostprocessing = 0; 149 | }; 150 | /* End PBXSourcesBuildPhase section */ 151 | 152 | /* Begin XCBuildConfiguration section */ 153 | 041B7A311E97A06600C1E135 /* Debug */ = { 154 | isa = XCBuildConfiguration; 155 | buildSettings = { 156 | ALWAYS_SEARCH_USER_PATHS = NO; 157 | CLANG_ANALYZER_NONNULL = YES; 158 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 159 | CLANG_CXX_LIBRARY = "libc++"; 160 | CLANG_ENABLE_MODULES = YES; 161 | CLANG_ENABLE_OBJC_ARC = YES; 162 | CLANG_WARN_BOOL_CONVERSION = YES; 163 | CLANG_WARN_CONSTANT_CONVERSION = YES; 164 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 165 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 166 | CLANG_WARN_EMPTY_BODY = YES; 167 | CLANG_WARN_ENUM_CONVERSION = YES; 168 | CLANG_WARN_INFINITE_RECURSION = YES; 169 | CLANG_WARN_INT_CONVERSION = YES; 170 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 171 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 172 | CLANG_WARN_UNREACHABLE_CODE = YES; 173 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 174 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 175 | COPY_PHASE_STRIP = NO; 176 | CURRENT_PROJECT_VERSION = 1; 177 | DEBUG_INFORMATION_FORMAT = dwarf; 178 | ENABLE_STRICT_OBJC_MSGSEND = YES; 179 | ENABLE_TESTABILITY = YES; 180 | GCC_C_LANGUAGE_STANDARD = gnu99; 181 | GCC_DYNAMIC_NO_PIC = NO; 182 | GCC_NO_COMMON_BLOCKS = YES; 183 | GCC_OPTIMIZATION_LEVEL = 0; 184 | GCC_PREPROCESSOR_DEFINITIONS = ( 185 | "DEBUG=1", 186 | "$(inherited)", 187 | ); 188 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 189 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 190 | GCC_WARN_UNDECLARED_SELECTOR = YES; 191 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 192 | GCC_WARN_UNUSED_FUNCTION = YES; 193 | GCC_WARN_UNUSED_VARIABLE = YES; 194 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 195 | MTL_ENABLE_DEBUG_INFO = YES; 196 | ONLY_ACTIVE_ARCH = YES; 197 | SDKROOT = iphoneos; 198 | TARGETED_DEVICE_FAMILY = "1,2"; 199 | VERSIONING_SYSTEM = "apple-generic"; 200 | VERSION_INFO_PREFIX = ""; 201 | }; 202 | name = Debug; 203 | }; 204 | 041B7A321E97A06600C1E135 /* Release */ = { 205 | isa = XCBuildConfiguration; 206 | buildSettings = { 207 | ALWAYS_SEARCH_USER_PATHS = NO; 208 | CLANG_ANALYZER_NONNULL = YES; 209 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 210 | CLANG_CXX_LIBRARY = "libc++"; 211 | CLANG_ENABLE_MODULES = YES; 212 | CLANG_ENABLE_OBJC_ARC = YES; 213 | CLANG_WARN_BOOL_CONVERSION = YES; 214 | CLANG_WARN_CONSTANT_CONVERSION = YES; 215 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 216 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 217 | CLANG_WARN_EMPTY_BODY = YES; 218 | CLANG_WARN_ENUM_CONVERSION = YES; 219 | CLANG_WARN_INFINITE_RECURSION = YES; 220 | CLANG_WARN_INT_CONVERSION = YES; 221 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 222 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 223 | CLANG_WARN_UNREACHABLE_CODE = YES; 224 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 225 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 226 | COPY_PHASE_STRIP = NO; 227 | CURRENT_PROJECT_VERSION = 1; 228 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 229 | ENABLE_NS_ASSERTIONS = NO; 230 | ENABLE_STRICT_OBJC_MSGSEND = YES; 231 | GCC_C_LANGUAGE_STANDARD = gnu99; 232 | GCC_NO_COMMON_BLOCKS = YES; 233 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 234 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 235 | GCC_WARN_UNDECLARED_SELECTOR = YES; 236 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 237 | GCC_WARN_UNUSED_FUNCTION = YES; 238 | GCC_WARN_UNUSED_VARIABLE = YES; 239 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 240 | MTL_ENABLE_DEBUG_INFO = NO; 241 | SDKROOT = iphoneos; 242 | TARGETED_DEVICE_FAMILY = "1,2"; 243 | VALIDATE_PRODUCT = YES; 244 | VERSIONING_SYSTEM = "apple-generic"; 245 | VERSION_INFO_PREFIX = ""; 246 | }; 247 | name = Release; 248 | }; 249 | 041B7A341E97A06600C1E135 /* Debug */ = { 250 | isa = XCBuildConfiguration; 251 | buildSettings = { 252 | CODE_SIGN_IDENTITY = ""; 253 | DEFINES_MODULE = YES; 254 | DYLIB_COMPATIBILITY_VERSION = 1; 255 | DYLIB_CURRENT_VERSION = 1; 256 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 257 | INFOPLIST_FILE = ZKUDID/Info.plist; 258 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 259 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 260 | PRODUCT_BUNDLE_IDENTIFIER = com.mushank.ZKUDID; 261 | PRODUCT_NAME = "$(TARGET_NAME)"; 262 | SKIP_INSTALL = YES; 263 | }; 264 | name = Debug; 265 | }; 266 | 041B7A351E97A06600C1E135 /* Release */ = { 267 | isa = XCBuildConfiguration; 268 | buildSettings = { 269 | CODE_SIGN_IDENTITY = ""; 270 | DEFINES_MODULE = YES; 271 | DYLIB_COMPATIBILITY_VERSION = 1; 272 | DYLIB_CURRENT_VERSION = 1; 273 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 274 | INFOPLIST_FILE = ZKUDID/Info.plist; 275 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 276 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 277 | PRODUCT_BUNDLE_IDENTIFIER = com.mushank.ZKUDID; 278 | PRODUCT_NAME = "$(TARGET_NAME)"; 279 | SKIP_INSTALL = YES; 280 | }; 281 | name = Release; 282 | }; 283 | /* End XCBuildConfiguration section */ 284 | 285 | /* Begin XCConfigurationList section */ 286 | 041B7A251E97A06600C1E135 /* Build configuration list for PBXProject "ZKUDID" */ = { 287 | isa = XCConfigurationList; 288 | buildConfigurations = ( 289 | 041B7A311E97A06600C1E135 /* Debug */, 290 | 041B7A321E97A06600C1E135 /* Release */, 291 | ); 292 | defaultConfigurationIsVisible = 0; 293 | defaultConfigurationName = Release; 294 | }; 295 | 041B7A331E97A06600C1E135 /* Build configuration list for PBXNativeTarget "ZKUDID" */ = { 296 | isa = XCConfigurationList; 297 | buildConfigurations = ( 298 | 041B7A341E97A06600C1E135 /* Debug */, 299 | 041B7A351E97A06600C1E135 /* Release */, 300 | ); 301 | defaultConfigurationIsVisible = 0; 302 | defaultConfigurationName = Release; 303 | }; 304 | /* End XCConfigurationList section */ 305 | }; 306 | rootObject = 041B7A221E97A06600C1E135 /* Project object */; 307 | } 308 | -------------------------------------------------------------------------------- /Carthage/ZKUDID.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Carthage/ZKUDID.xcodeproj/xcshareddata/xcschemes/ZKUDID.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 | -------------------------------------------------------------------------------- /Carthage/ZKUDID/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 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 041B7A201E97973100C1E135 /* ZKUDID.m in Sources */ = {isa = PBXBuildFile; fileRef = 041B7A1F1E97973100C1E135 /* ZKUDID.m */; }; 11 | DD99FF881CA97278005045C4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DD99FF871CA97278005045C4 /* main.m */; }; 12 | DD99FF8B1CA97278005045C4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DD99FF8A1CA97278005045C4 /* AppDelegate.m */; }; 13 | DD99FF8E1CA97278005045C4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD99FF8D1CA97278005045C4 /* ViewController.m */; }; 14 | DD99FF911CA97278005045C4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DD99FF8F1CA97278005045C4 /* Main.storyboard */; }; 15 | DD99FF931CA97278005045C4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DD99FF921CA97278005045C4 /* Assets.xcassets */; }; 16 | DD99FF961CA97278005045C4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DD99FF941CA97278005045C4 /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 041B7A1E1E97973100C1E135 /* ZKUDID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZKUDID.h; sourceTree = ""; }; 21 | 041B7A1F1E97973100C1E135 /* ZKUDID.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZKUDID.m; sourceTree = ""; }; 22 | 046B78D41DCDF4BA00BBA571 /* Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Demo.entitlements; sourceTree = ""; }; 23 | DD99FF831CA97278005045C4 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | DD99FF871CA97278005045C4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 25 | DD99FF891CA97278005045C4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 26 | DD99FF8A1CA97278005045C4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 27 | DD99FF8C1CA97278005045C4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 28 | DD99FF8D1CA97278005045C4 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 29 | DD99FF901CA97278005045C4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 30 | DD99FF921CA97278005045C4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 31 | DD99FF951CA97278005045C4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 32 | DD99FF971CA97278005045C4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | /* End PBXFileReference section */ 34 | 35 | /* Begin PBXFrameworksBuildPhase section */ 36 | DD99FF801CA97278005045C4 /* Frameworks */ = { 37 | isa = PBXFrameworksBuildPhase; 38 | buildActionMask = 2147483647; 39 | files = ( 40 | ); 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXFrameworksBuildPhase section */ 44 | 45 | /* Begin PBXGroup section */ 46 | 041B7A1D1E97973100C1E135 /* ZKUDID */ = { 47 | isa = PBXGroup; 48 | children = ( 49 | 041B7A1E1E97973100C1E135 /* ZKUDID.h */, 50 | 041B7A1F1E97973100C1E135 /* ZKUDID.m */, 51 | ); 52 | name = ZKUDID; 53 | path = ../../ZKUDID; 54 | sourceTree = ""; 55 | }; 56 | DD99FF7A1CA97278005045C4 = { 57 | isa = PBXGroup; 58 | children = ( 59 | DD99FF851CA97278005045C4 /* Demo */, 60 | DD99FF841CA97278005045C4 /* Products */, 61 | ); 62 | sourceTree = ""; 63 | }; 64 | DD99FF841CA97278005045C4 /* Products */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | DD99FF831CA97278005045C4 /* Demo.app */, 68 | ); 69 | name = Products; 70 | sourceTree = ""; 71 | }; 72 | DD99FF851CA97278005045C4 /* Demo */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | DD99FF891CA97278005045C4 /* AppDelegate.h */, 76 | DD99FF8A1CA97278005045C4 /* AppDelegate.m */, 77 | DD99FF8C1CA97278005045C4 /* ViewController.h */, 78 | DD99FF8D1CA97278005045C4 /* ViewController.m */, 79 | 041B7A1D1E97973100C1E135 /* ZKUDID */, 80 | DD99FF921CA97278005045C4 /* Assets.xcassets */, 81 | DD99FF861CA97278005045C4 /* Supporting Files */, 82 | ); 83 | path = Demo; 84 | sourceTree = ""; 85 | }; 86 | DD99FF861CA97278005045C4 /* Supporting Files */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | DD99FF8F1CA97278005045C4 /* Main.storyboard */, 90 | DD99FF941CA97278005045C4 /* LaunchScreen.storyboard */, 91 | DD99FF871CA97278005045C4 /* main.m */, 92 | DD99FF971CA97278005045C4 /* Info.plist */, 93 | 046B78D41DCDF4BA00BBA571 /* Demo.entitlements */, 94 | ); 95 | name = "Supporting Files"; 96 | sourceTree = ""; 97 | }; 98 | /* End PBXGroup section */ 99 | 100 | /* Begin PBXNativeTarget section */ 101 | DD99FF821CA97278005045C4 /* Demo */ = { 102 | isa = PBXNativeTarget; 103 | buildConfigurationList = DD99FF9A1CA97278005045C4 /* Build configuration list for PBXNativeTarget "Demo" */; 104 | buildPhases = ( 105 | DD99FF7F1CA97278005045C4 /* Sources */, 106 | DD99FF801CA97278005045C4 /* Frameworks */, 107 | DD99FF811CA97278005045C4 /* Resources */, 108 | ); 109 | buildRules = ( 110 | ); 111 | dependencies = ( 112 | ); 113 | name = Demo; 114 | productName = Demo; 115 | productReference = DD99FF831CA97278005045C4 /* Demo.app */; 116 | productType = "com.apple.product-type.application"; 117 | }; 118 | /* End PBXNativeTarget section */ 119 | 120 | /* Begin PBXProject section */ 121 | DD99FF7B1CA97278005045C4 /* Project object */ = { 122 | isa = PBXProject; 123 | attributes = { 124 | LastUpgradeCheck = 0800; 125 | ORGANIZATIONNAME = mushank; 126 | TargetAttributes = { 127 | DD99FF821CA97278005045C4 = { 128 | CreatedOnToolsVersion = 7.2.1; 129 | DevelopmentTeam = FE8QNZJ7C9; 130 | SystemCapabilities = { 131 | com.apple.Keychain = { 132 | enabled = 1; 133 | }; 134 | }; 135 | }; 136 | }; 137 | }; 138 | buildConfigurationList = DD99FF7E1CA97278005045C4 /* Build configuration list for PBXProject "Demo" */; 139 | compatibilityVersion = "Xcode 3.2"; 140 | developmentRegion = English; 141 | hasScannedForEncodings = 0; 142 | knownRegions = ( 143 | en, 144 | Base, 145 | ); 146 | mainGroup = DD99FF7A1CA97278005045C4; 147 | productRefGroup = DD99FF841CA97278005045C4 /* Products */; 148 | projectDirPath = ""; 149 | projectRoot = ""; 150 | targets = ( 151 | DD99FF821CA97278005045C4 /* Demo */, 152 | ); 153 | }; 154 | /* End PBXProject section */ 155 | 156 | /* Begin PBXResourcesBuildPhase section */ 157 | DD99FF811CA97278005045C4 /* Resources */ = { 158 | isa = PBXResourcesBuildPhase; 159 | buildActionMask = 2147483647; 160 | files = ( 161 | DD99FF961CA97278005045C4 /* LaunchScreen.storyboard in Resources */, 162 | DD99FF931CA97278005045C4 /* Assets.xcassets in Resources */, 163 | DD99FF911CA97278005045C4 /* Main.storyboard in Resources */, 164 | ); 165 | runOnlyForDeploymentPostprocessing = 0; 166 | }; 167 | /* End PBXResourcesBuildPhase section */ 168 | 169 | /* Begin PBXSourcesBuildPhase section */ 170 | DD99FF7F1CA97278005045C4 /* Sources */ = { 171 | isa = PBXSourcesBuildPhase; 172 | buildActionMask = 2147483647; 173 | files = ( 174 | DD99FF8E1CA97278005045C4 /* ViewController.m in Sources */, 175 | DD99FF8B1CA97278005045C4 /* AppDelegate.m in Sources */, 176 | 041B7A201E97973100C1E135 /* ZKUDID.m in Sources */, 177 | DD99FF881CA97278005045C4 /* main.m in Sources */, 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | }; 181 | /* End PBXSourcesBuildPhase section */ 182 | 183 | /* Begin PBXVariantGroup section */ 184 | DD99FF8F1CA97278005045C4 /* Main.storyboard */ = { 185 | isa = PBXVariantGroup; 186 | children = ( 187 | DD99FF901CA97278005045C4 /* Base */, 188 | ); 189 | name = Main.storyboard; 190 | sourceTree = ""; 191 | }; 192 | DD99FF941CA97278005045C4 /* LaunchScreen.storyboard */ = { 193 | isa = PBXVariantGroup; 194 | children = ( 195 | DD99FF951CA97278005045C4 /* Base */, 196 | ); 197 | name = LaunchScreen.storyboard; 198 | sourceTree = ""; 199 | }; 200 | /* End PBXVariantGroup section */ 201 | 202 | /* Begin XCBuildConfiguration section */ 203 | DD99FF981CA97278005045C4 /* Debug */ = { 204 | isa = XCBuildConfiguration; 205 | buildSettings = { 206 | ALWAYS_SEARCH_USER_PATHS = NO; 207 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 208 | CLANG_CXX_LIBRARY = "libc++"; 209 | CLANG_ENABLE_MODULES = YES; 210 | CLANG_ENABLE_OBJC_ARC = YES; 211 | CLANG_WARN_BOOL_CONVERSION = YES; 212 | CLANG_WARN_CONSTANT_CONVERSION = YES; 213 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 214 | CLANG_WARN_EMPTY_BODY = YES; 215 | CLANG_WARN_ENUM_CONVERSION = YES; 216 | CLANG_WARN_INFINITE_RECURSION = YES; 217 | CLANG_WARN_INT_CONVERSION = YES; 218 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 219 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 220 | CLANG_WARN_UNREACHABLE_CODE = YES; 221 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 222 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 223 | COPY_PHASE_STRIP = NO; 224 | DEBUG_INFORMATION_FORMAT = dwarf; 225 | ENABLE_STRICT_OBJC_MSGSEND = YES; 226 | ENABLE_TESTABILITY = YES; 227 | GCC_C_LANGUAGE_STANDARD = gnu99; 228 | GCC_DYNAMIC_NO_PIC = NO; 229 | GCC_NO_COMMON_BLOCKS = YES; 230 | GCC_OPTIMIZATION_LEVEL = 0; 231 | GCC_PREPROCESSOR_DEFINITIONS = ( 232 | "DEBUG=1", 233 | "$(inherited)", 234 | ); 235 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 236 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 237 | GCC_WARN_UNDECLARED_SELECTOR = YES; 238 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 239 | GCC_WARN_UNUSED_FUNCTION = YES; 240 | GCC_WARN_UNUSED_VARIABLE = YES; 241 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 242 | MTL_ENABLE_DEBUG_INFO = YES; 243 | ONLY_ACTIVE_ARCH = YES; 244 | SDKROOT = iphoneos; 245 | TARGETED_DEVICE_FAMILY = "1,2"; 246 | }; 247 | name = Debug; 248 | }; 249 | DD99FF991CA97278005045C4 /* Release */ = { 250 | isa = XCBuildConfiguration; 251 | buildSettings = { 252 | ALWAYS_SEARCH_USER_PATHS = NO; 253 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 254 | CLANG_CXX_LIBRARY = "libc++"; 255 | CLANG_ENABLE_MODULES = YES; 256 | CLANG_ENABLE_OBJC_ARC = YES; 257 | CLANG_WARN_BOOL_CONVERSION = YES; 258 | CLANG_WARN_CONSTANT_CONVERSION = YES; 259 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 260 | CLANG_WARN_EMPTY_BODY = YES; 261 | CLANG_WARN_ENUM_CONVERSION = YES; 262 | CLANG_WARN_INFINITE_RECURSION = YES; 263 | CLANG_WARN_INT_CONVERSION = YES; 264 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 265 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 266 | CLANG_WARN_UNREACHABLE_CODE = YES; 267 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 268 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 269 | COPY_PHASE_STRIP = NO; 270 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 271 | ENABLE_NS_ASSERTIONS = NO; 272 | ENABLE_STRICT_OBJC_MSGSEND = YES; 273 | GCC_C_LANGUAGE_STANDARD = gnu99; 274 | GCC_NO_COMMON_BLOCKS = YES; 275 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 276 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 277 | GCC_WARN_UNDECLARED_SELECTOR = YES; 278 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 279 | GCC_WARN_UNUSED_FUNCTION = YES; 280 | GCC_WARN_UNUSED_VARIABLE = YES; 281 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 282 | MTL_ENABLE_DEBUG_INFO = NO; 283 | SDKROOT = iphoneos; 284 | TARGETED_DEVICE_FAMILY = "1,2"; 285 | VALIDATE_PRODUCT = YES; 286 | }; 287 | name = Release; 288 | }; 289 | DD99FF9B1CA97278005045C4 /* Debug */ = { 290 | isa = XCBuildConfiguration; 291 | buildSettings = { 292 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 293 | CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements; 294 | DEVELOPMENT_TEAM = FE8QNZJ7C9; 295 | INFOPLIST_FILE = Demo/Info.plist; 296 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 297 | PRODUCT_BUNDLE_IDENTIFIER = com.mushank.Demo; 298 | PRODUCT_NAME = "$(TARGET_NAME)"; 299 | }; 300 | name = Debug; 301 | }; 302 | DD99FF9C1CA97278005045C4 /* Release */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 306 | CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements; 307 | DEVELOPMENT_TEAM = FE8QNZJ7C9; 308 | INFOPLIST_FILE = Demo/Info.plist; 309 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 310 | PRODUCT_BUNDLE_IDENTIFIER = com.mushank.Demo; 311 | PRODUCT_NAME = "$(TARGET_NAME)"; 312 | }; 313 | name = Release; 314 | }; 315 | /* End XCBuildConfiguration section */ 316 | 317 | /* Begin XCConfigurationList section */ 318 | DD99FF7E1CA97278005045C4 /* Build configuration list for PBXProject "Demo" */ = { 319 | isa = XCConfigurationList; 320 | buildConfigurations = ( 321 | DD99FF981CA97278005045C4 /* Debug */, 322 | DD99FF991CA97278005045C4 /* Release */, 323 | ); 324 | defaultConfigurationIsVisible = 0; 325 | defaultConfigurationName = Release; 326 | }; 327 | DD99FF9A1CA97278005045C4 /* Build configuration list for PBXNativeTarget "Demo" */ = { 328 | isa = XCConfigurationList; 329 | buildConfigurations = ( 330 | DD99FF9B1CA97278005045C4 /* Debug */, 331 | DD99FF9C1CA97278005045C4 /* Release */, 332 | ); 333 | defaultConfigurationIsVisible = 0; 334 | defaultConfigurationName = Release; 335 | }; 336 | /* End XCConfigurationList section */ 337 | }; 338 | rootObject = DD99FF7B1CA97278005045C4 /* Project object */; 339 | } 340 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Demo/Demo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Demo 4 | // 5 | // Created by Jack on 3/28/16. 6 | // Copyright © 2016 mushank. 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 | -------------------------------------------------------------------------------- /Demo/Demo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Demo 4 | // 5 | // Created by Jack on 3/28/16. 6 | // Copyright © 2016 mushank. 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 | -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /Demo/Demo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Demo/Demo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Demo/Demo/Demo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | keychain-access-groups 6 | 7 | $(AppIdentifierPrefix)com.mushank.Demo 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demo/Demo/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Demo/Demo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Demo 4 | // 5 | // Created by Jack on 3/28/16. 6 | // Copyright © 2016 mushank. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Demo/Demo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Demo 4 | // 5 | // Created by Jack on 3/28/16. 6 | // Copyright © 2016 mushank. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "ZKUDID.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view, typically from a nib. 21 | 22 | // Example Code 23 | [ZKUDID setDebug:YES]; // default is NO. 24 | NSString *UDID = [ZKUDID value]; 25 | NSLog(@"UDID: %@",UDID); 26 | } 27 | 28 | - (void)didReceiveMemoryWarning { 29 | [super didReceiveMemoryWarning]; 30 | // Dispose of any resources that can be recreated. 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Demo/Demo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Demo 4 | // 5 | // Created by Jack on 3/28/16. 6 | // Copyright © 2016 mushank. 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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Jack 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ZKUDID 2 | 3 | [![Travis-CI](https://travis-ci.org/mushank/ZKUDID.svg?branch=master)](https://travis-ci.org/mushank/ZKUDID) [![Carthage](https://img.shields.io/badge/carthage-compatible-green.svg)](https://github.com/Carthage/Carthage) [![CocoaPods](https://img.shields.io/badge/pod-2.0-green.svg)](http://cocoapods.org/?q=ZKUDID) [![Platform](https://img.shields.io/badge/platform-iOS-lightgrey.svg)](http://www.apple.com/ios) [![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mushank/ZKUDID/blob/master/LICENSE) 4 | 5 | 6 | **Generate and save permanent UDID with IDFV and keychain in iOS device.** 7 | 8 | *Use `IDFV(identifierForVendor)` + `keychain` to make sure UDID consistency, even if the App has been removed or reinstalled.* 9 | 10 | *A replacement for the deprecated mean of `OpenUDID`.* 11 | 12 | ## Install 13 | 14 | #### CocoaPods 15 | 16 | Available through [CocoaPods](http://cocoapods.org/), simply add the following line to your Podfile: 17 | 18 | ``` 19 | pod 'ZKUDID', '~> 2.0' 20 | ``` 21 | 22 | #### Carthage 23 | 24 | Available through [Carthage](https://github.com/Carthage/Carthage), simply add the following line to your Cartfile: 25 | 26 | ``` 27 | github "mushank/ZKUDID" ~> 2.0 28 | ``` 29 | 30 | *Noti: Requires iOS 6.0 or later* 31 | 32 | ## Usage 33 | It's so simple, just two lines of code: 34 | 35 | ``` 36 | #include "ZKUDID.h" 37 | NSString *UDIDString = [ZKUDID value]; 38 | ``` 39 | 40 | ⚠️***Attention:*** *If you get the value `(null)`, please check your `KeyChain Entitlemen` setting: Go to project settings->Capabilities->Keychain Sharing->Add Keychain Groups+Turn On*. It usually happens in iOS 10. 41 | 42 | ## Source files 43 | 44 | They are in the `ZKUDID` folder: 45 | 46 | - `ZKUDID.h` 47 | - `ZKUDID.m` 48 | 49 | Now, enjoy yourself! 50 | 51 | ## License 52 | 53 | ZKUDID is released under [MIT License](https://github.com/mushank/ZKUDID/blob/master/LICENSE). -------------------------------------------------------------------------------- /ZKUDID.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | s.name = 'ZKUDID' 4 | s.version = '2.0' 5 | s.license = 'MIT' 6 | s.summary = 'Generate and save permanent UDID with IDFV and keychain in iOS device.' 7 | s.homepage = 'https://github.com/mushank/ZKUDID' 8 | s.author = { 'Jack' => 'mushank@Gmail.com' } 9 | s.source = { :git => 'https://github.com/mushank/ZKUDID.git', :tag => s.version } 10 | s.platform = :ios, "6.0" 11 | s.source_files = 'ZKUDID/*.{h,m}' 12 | s.framework = 'UIKit' 13 | s.requires_arc = true 14 | end -------------------------------------------------------------------------------- /ZKUDID/ZKUDID.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZKUDID.h 3 | // ZKUDID 4 | // 5 | // https://github.com/mushank/ZKUDID 6 | // 7 | // Created by Jack on 2/19/16. 8 | // Copyright © 2016 mushank. All rights reserved. 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy 11 | // of this software and associated documentation files (the "Software"), to deal 12 | // in the Software without restriction, including without limitation the rights 13 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the Software is 15 | // furnished to do so, subject to the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be included in all 18 | // copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | // SOFTWARE. 27 | 28 | #import 29 | 30 | 31 | @interface ZKUDID : NSObject 32 | 33 | ///-------------------------------------------------------------------- 34 | /// Usually, the method `+ (NSString *)value` is enough for you to use. 35 | ///-------------------------------------------------------------------- 36 | /** 37 | * method value, Requires iOS6.0 and later 38 | * abstract Obtain UDID(Unique Device Identity). If it already exits in keychain, return the exit one; otherwise generate a new one and store it into the keychain then return. 39 | * discussion Use 'identifierForVendor + keychain' to make sure UDID consistency even if the App has been removed or reinstalled. 40 | * param NULL 41 | * param result return UDID String 42 | */ 43 | + (NSString *)value; 44 | 45 | 46 | /** 47 | * method setDebug: 48 | * abstract Set `YES` to open debug mode, defalut is `NO`. 49 | * discussion Should be called before method `+ (NSString *)value`. 50 | * param mode 51 | * param result void 52 | */ 53 | + (void)setDebug:(BOOL)mode; 54 | 55 | 56 | #pragma mark - Extension Method: Insert / Delete / Update / Select 57 | /** 58 | * method selectKeychainItemWithIdentifier: serviceName: 59 | * abstract Find out if the item already exists in the keychain. If exist, return the item, else return nil. 60 | * discussion 61 | * param identifier 62 | * param serviceName 63 | * param result return the selected item or nil. 64 | */ 65 | + (NSData *)selectKeychainItemWithIdentifier:(NSString *)identifier serviceName:(NSString *)serviceName; 66 | 67 | /** 68 | * method insertKeychainItemWithValue: identifier: serviceName: 69 | * abstract Insert an item into keychain. If success, return YES, else return NO. 70 | * discussion 71 | * param value 72 | * param identifier 73 | * param serviceName 74 | * param result return YES or NO 75 | */ 76 | + (BOOL)insertKeychainItemWithValue:(NSString *)value identifier:(NSString *)identifier serviceName:(NSString *)serviceName; 77 | 78 | /** 79 | * method updateKeychainItemWithValue: identifier: serviceName: 80 | * abstract Update a keychain item, If success, return YES, else return NO. 81 | * discussion 82 | * param value 83 | * param identifier 84 | * param serviceName 85 | * param result return YES or NO 86 | */ 87 | + (BOOL)updateKeychainItemWithValue:(NSString *)value identifier:(NSString *)identifier serviceName:(NSString *)serviceName; 88 | 89 | /** 90 | * method deleteKeychainItemWithIdentifier: serviceName: 91 | * abstract Delete a keychain item. If success, return YES, else return NO. 92 | * discussion 93 | * param identifier 94 | * param serviceName 95 | * param result return YES or NO 96 | */ 97 | + (BOOL)deleteKeychainItemWithIdentifier:(NSString *)identifier serviceName:(NSString *)serviceName; 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /ZKUDID/ZKUDID.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZKUDID.m 3 | // ZKUDID 4 | // 5 | // https://github.com/mushank/ZKUDID 6 | // 7 | // Created by Jack on 2/19/16. 8 | // Copyright © 2016 mushank. All rights reserved. 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy 11 | // of this software and associated documentation files (the "Software"), to deal 12 | // in the Software without restriction, including without limitation the rights 13 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the Software is 15 | // furnished to do so, subject to the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be included in all 18 | // copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | // SOFTWARE. 27 | 28 | #import "ZKUDID.h" 29 | #import 30 | 31 | static BOOL kDebugMode = NO; 32 | static NSString *kUDIDValue = nil; 33 | static NSString *const kKeychainUDIDItemIdentifier = @"UDID"; /* Replace with your own UDID identifier */ 34 | static NSString *const kKeychainUDIDItemServiceName = @"com.mushank.ZKUDID"; /* Replace with your own service name, usually you can use your App Bundle ID */ 35 | 36 | @implementation ZKUDID 37 | 38 | + (NSString *)value { 39 | if (kUDIDValue == nil) { 40 | @synchronized ([self class]) { 41 | NSData *itemData = [self selectKeychainItemWithIdentifier:kKeychainUDIDItemIdentifier serviceName:kKeychainUDIDItemServiceName]; 42 | if (itemData) { 43 | kUDIDValue = [[NSString alloc]initWithData:itemData encoding:NSUTF8StringEncoding]; 44 | } else { 45 | kUDIDValue = [self getIDFVString]; 46 | [self insertKeychainItemWithValue:kUDIDValue identifier:kKeychainUDIDItemIdentifier serviceName:kKeychainUDIDItemServiceName]; 47 | } 48 | } 49 | } 50 | 51 | return kUDIDValue; 52 | } 53 | 54 | + (void)setDebug:(BOOL)mode { 55 | kDebugMode = mode; 56 | } 57 | 58 | 59 | #pragma mark - Extension Method: Insert / Delete / Update / Select 60 | /** 61 | * To find out if our UDID string already exists in the keychain (and what the value of the UDID string is), we use the `SecItemCopyMatching` function. 62 | */ 63 | + (NSData *)selectKeychainItemWithIdentifier:(NSString *)identifier serviceName:(NSString *)serviceName { 64 | NSMutableDictionary *dicForSelect = [self baseAttributeDictionary:identifier serviceName:serviceName]; 65 | 66 | /** 67 | * key `kSecMatchLimit` is to limit the number of search results that returned. We are looking for a single entry so we set the attribute to `kSecMatchLimitOne`. 68 | */ 69 | [dicForSelect setObject:(id)kSecMatchLimitOne forKey:(id)kSecMatchLimit]; 70 | 71 | /** 72 | * key `kSecReturnData` determines how the result is returned. Since we are expecting only a single attribute to be returned (the UDID string) we can set it to `kCFBooleanTrue`. This means we will get an NSData reference back that we can access directly. 73 | */ 74 | [dicForSelect setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnData]; 75 | /** !!! 76 | * If we were storing and searching for a keychain item with multiple attributes (for example if we were storing an account name and password in the same keychain item) we would need to add the attribute `kSecReturnAttributes` and the result would be a dictionary of attributes. 77 | */ 78 | 79 | NSData *result = nil; 80 | OSStatus status = SecItemCopyMatching((CFDictionaryRef)dicForSelect, (void *)&result); 81 | if (status == errSecSuccess) { 82 | // success 83 | } else { 84 | // failure 85 | } 86 | [self logAction:@"SecItemCopyMatching" status:(NSInteger)status]; 87 | 88 | return result; 89 | } 90 | 91 | /** 92 | * Inserting an keychain item is almost the same as the select function except that we need to set the value of the UDID string which we want to store. We use the `SecItemAdd` function. 93 | */ 94 | + (BOOL)insertKeychainItemWithValue:(NSString *)value identifier:(NSString *)identifier serviceName:(NSString *)serviceName { 95 | NSMutableDictionary *dicForInsert = [self baseAttributeDictionary:identifier serviceName:serviceName]; 96 | 97 | /** 98 | * Add the key `kSecValueData` to the attribute dictionary to set the value of the keychain item(here means the UDID string), besides making sure encode the value string 99 | */ 100 | NSData *dataForInsert = [value dataUsingEncoding:NSUTF8StringEncoding]; 101 | [dicForInsert setObject:dataForInsert forKey:(id)kSecValueData]; 102 | 103 | BOOL isSucceeded; 104 | OSStatus status = SecItemAdd((CFDictionaryRef)dicForInsert, NULL); 105 | if (status == errSecSuccess) { 106 | isSucceeded = YES; 107 | } else { 108 | isSucceeded = NO; 109 | } 110 | [self logAction:@"SecItemAdd" status:(NSInteger)status]; 111 | 112 | return isSucceeded; 113 | } 114 | 115 | /** 116 | * Updating a keychain item is similar to inserting an item except that a separate dictionary is used to contain the attributes to be updated. We use the `SecItemUpdate` function. 117 | */ 118 | + (BOOL)updateKeychainItemWithValue:(NSString *)value identifier:(NSString *)identifier serviceName:(NSString *)serviceName { 119 | NSMutableDictionary *dicForSelect = [self baseAttributeDictionary:identifier serviceName:serviceName]; 120 | 121 | NSMutableDictionary *dicForUpdate = [[NSMutableDictionary alloc]init]; 122 | NSData *dataForUpdate = [value dataUsingEncoding:NSUTF8StringEncoding]; 123 | [dicForUpdate setObject:dataForUpdate forKey:(id)kSecValueData]; 124 | 125 | BOOL isSucceeded; 126 | OSStatus status = SecItemUpdate((CFDictionaryRef)dicForSelect, (CFDictionaryRef)dicForUpdate); 127 | if (status == errSecSuccess) { 128 | isSucceeded = YES; 129 | } else { 130 | isSucceeded = NO; 131 | } 132 | [self logAction:@"SecItemUpdate" status:(NSInteger)status]; 133 | 134 | return isSucceeded; 135 | } 136 | 137 | /** 138 | * To delete an item from the keychain, we use the `SecItemDelete` function. 139 | */ 140 | + (BOOL)deleteKeychainItemWithIdentifier:(NSString *)identifier serviceName:(NSString *)serviceName { 141 | NSMutableDictionary *dicForDelete = [self baseAttributeDictionary:identifier serviceName:serviceName]; 142 | 143 | BOOL isSucceeded; 144 | OSStatus status = SecItemDelete((CFDictionaryRef)dicForDelete); 145 | if (status == errSecSuccess) { 146 | isSucceeded = YES; 147 | } else { 148 | isSucceeded = NO; 149 | } 150 | [self logAction:@"SecItemDelete" status:(NSInteger)status]; 151 | 152 | return isSucceeded; 153 | } 154 | 155 | #pragma mark - Private Method 156 | /** 157 | * get identifierForVendor String 158 | */ 159 | + (NSString *)getIDFVString { 160 | return [[UIDevice currentDevice].identifierForVendor UUIDString]; 161 | } 162 | 163 | /** 164 | * This function allocates and constructs a dictionary which defines the attributes of the keychain item you want to insert, delete, update or select. 165 | */ 166 | + (NSMutableDictionary *)baseAttributeDictionary:(NSString *)identifier serviceName:(NSString *)serviceName { 167 | NSMutableDictionary *baseAttributeDictionary = [[NSMutableDictionary alloc] init]; 168 | 169 | /** 170 | * key `kSecClass` defines the class of the keychain item we will be dealing with. I want to store a UDID string(more like a password) into the keychain so I use `kSecClassGenericPassword` for the key's value. 171 | */ 172 | [baseAttributeDictionary setObject:(id)kSecClassGenericPassword forKey:(id)kSecClass]; 173 | 174 | /** 175 | * key `kSecAttrGeneric` is what we will use to identify the keychain item. It can be any value we choose such as “Password” or “License”, etc. To be clear this is not the actual value of the keychain item just a label we will attach to this keychain item so we can find it later. In theory our application could store a number of items in the keychain so we need to have a way to identify this particular one from the others. The value for the key `kSecAttrGeneric` has to be encoded before being added to the dictionary. 176 | */ 177 | NSData *encodedIdentifier = [identifier dataUsingEncoding:NSUTF8StringEncoding]; 178 | [baseAttributeDictionary setObject:encodedIdentifier forKey:(id)kSecAttrGeneric]; 179 | 180 | /** 181 | * key `kSecAttrAccount` and `kSecAttrService` should be set to something unique for this keychain. 182 | */ 183 | [baseAttributeDictionary setObject:encodedIdentifier forKey:(id)kSecAttrAccount]; 184 | [baseAttributeDictionary setObject:serviceName forKey:(id)kSecAttrService]; 185 | 186 | return baseAttributeDictionary; 187 | } 188 | 189 | + (void)logAction:(NSString *)action status:(NSInteger)status { 190 | if (kDebugMode) { 191 | NSLog(@"%@ Executed: `[KeychainAction: %@], [OSStatus: %ld]`", NSStringFromClass(self.class), action ,(long)status); 192 | } 193 | } 194 | 195 | @end 196 | --------------------------------------------------------------------------------