├── QRCodeGen.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ ├── gabriel.xcuserdatad │ └── xcschemes │ │ ├── QRCodeGen.xcscheme │ │ └── xcschememanagement.plist │ └── simon.xcuserdatad │ └── xcschemes │ ├── QRCodeGen.xcscheme │ └── xcschememanagement.plist ├── QRCodeGen ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist └── ViewController.swift ├── QRCodeGenTests ├── Info.plist └── QRCodeGenTests.swift └── README.md /QRCodeGen.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C0BB55771AEE8C850084259C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0BB55761AEE8C850084259C /* AppDelegate.swift */; }; 11 | C0BB55791AEE8C850084259C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0BB55781AEE8C850084259C /* ViewController.swift */; }; 12 | C0BB557C1AEE8C850084259C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C0BB557A1AEE8C850084259C /* Main.storyboard */; }; 13 | C0BB557E1AEE8C850084259C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C0BB557D1AEE8C850084259C /* Images.xcassets */; }; 14 | C0BB55811AEE8C850084259C /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0BB557F1AEE8C850084259C /* LaunchScreen.xib */; }; 15 | C0BB558D1AEE8C850084259C /* QRCodeGenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0BB558C1AEE8C850084259C /* QRCodeGenTests.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | C0BB55871AEE8C850084259C /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = C0BB55691AEE8C850084259C /* Project object */; 22 | proxyType = 1; 23 | remoteGlobalIDString = C0BB55701AEE8C850084259C; 24 | remoteInfo = QRCodeGen; 25 | }; 26 | /* End PBXContainerItemProxy section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | C0BB55711AEE8C850084259C /* QRCodeGen.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = QRCodeGen.app; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | C0BB55751AEE8C850084259C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31 | C0BB55761AEE8C850084259C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 32 | C0BB55781AEE8C850084259C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 33 | C0BB557B1AEE8C850084259C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 34 | C0BB557D1AEE8C850084259C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 35 | C0BB55801AEE8C850084259C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 36 | C0BB55861AEE8C850084259C /* QRCodeGenTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QRCodeGenTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | C0BB558B1AEE8C850084259C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | C0BB558C1AEE8C850084259C /* QRCodeGenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRCodeGenTests.swift; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | C0BB556E1AEE8C850084259C /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | ); 47 | runOnlyForDeploymentPostprocessing = 0; 48 | }; 49 | C0BB55831AEE8C850084259C /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | C0BB55681AEE8C850084259C = { 60 | isa = PBXGroup; 61 | children = ( 62 | C0BB55731AEE8C850084259C /* QRCodeGen */, 63 | C0BB55891AEE8C850084259C /* QRCodeGenTests */, 64 | C0BB55721AEE8C850084259C /* Products */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | C0BB55721AEE8C850084259C /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | C0BB55711AEE8C850084259C /* QRCodeGen.app */, 72 | C0BB55861AEE8C850084259C /* QRCodeGenTests.xctest */, 73 | ); 74 | name = Products; 75 | sourceTree = ""; 76 | }; 77 | C0BB55731AEE8C850084259C /* QRCodeGen */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | C0BB55761AEE8C850084259C /* AppDelegate.swift */, 81 | C0BB55781AEE8C850084259C /* ViewController.swift */, 82 | C0BB557A1AEE8C850084259C /* Main.storyboard */, 83 | C0BB557D1AEE8C850084259C /* Images.xcassets */, 84 | C0BB557F1AEE8C850084259C /* LaunchScreen.xib */, 85 | C0BB55741AEE8C850084259C /* Supporting Files */, 86 | ); 87 | path = QRCodeGen; 88 | sourceTree = ""; 89 | }; 90 | C0BB55741AEE8C850084259C /* Supporting Files */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | C0BB55751AEE8C850084259C /* Info.plist */, 94 | ); 95 | name = "Supporting Files"; 96 | sourceTree = ""; 97 | }; 98 | C0BB55891AEE8C850084259C /* QRCodeGenTests */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | C0BB558C1AEE8C850084259C /* QRCodeGenTests.swift */, 102 | C0BB558A1AEE8C850084259C /* Supporting Files */, 103 | ); 104 | path = QRCodeGenTests; 105 | sourceTree = ""; 106 | }; 107 | C0BB558A1AEE8C850084259C /* Supporting Files */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | C0BB558B1AEE8C850084259C /* Info.plist */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | /* End PBXGroup section */ 116 | 117 | /* Begin PBXNativeTarget section */ 118 | C0BB55701AEE8C850084259C /* QRCodeGen */ = { 119 | isa = PBXNativeTarget; 120 | buildConfigurationList = C0BB55901AEE8C850084259C /* Build configuration list for PBXNativeTarget "QRCodeGen" */; 121 | buildPhases = ( 122 | C0BB556D1AEE8C850084259C /* Sources */, 123 | C0BB556E1AEE8C850084259C /* Frameworks */, 124 | C0BB556F1AEE8C850084259C /* Resources */, 125 | ); 126 | buildRules = ( 127 | ); 128 | dependencies = ( 129 | ); 130 | name = QRCodeGen; 131 | productName = QRCodeGen; 132 | productReference = C0BB55711AEE8C850084259C /* QRCodeGen.app */; 133 | productType = "com.apple.product-type.application"; 134 | }; 135 | C0BB55851AEE8C850084259C /* QRCodeGenTests */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = C0BB55931AEE8C850084259C /* Build configuration list for PBXNativeTarget "QRCodeGenTests" */; 138 | buildPhases = ( 139 | C0BB55821AEE8C850084259C /* Sources */, 140 | C0BB55831AEE8C850084259C /* Frameworks */, 141 | C0BB55841AEE8C850084259C /* Resources */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | C0BB55881AEE8C850084259C /* PBXTargetDependency */, 147 | ); 148 | name = QRCodeGenTests; 149 | productName = QRCodeGenTests; 150 | productReference = C0BB55861AEE8C850084259C /* QRCodeGenTests.xctest */; 151 | productType = "com.apple.product-type.bundle.unit-test"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | C0BB55691AEE8C850084259C /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 0630; 160 | ORGANIZATIONNAME = Appcoda; 161 | TargetAttributes = { 162 | C0BB55701AEE8C850084259C = { 163 | CreatedOnToolsVersion = 6.3; 164 | }; 165 | C0BB55851AEE8C850084259C = { 166 | CreatedOnToolsVersion = 6.3; 167 | TestTargetID = C0BB55701AEE8C850084259C; 168 | }; 169 | }; 170 | }; 171 | buildConfigurationList = C0BB556C1AEE8C850084259C /* Build configuration list for PBXProject "QRCodeGen" */; 172 | compatibilityVersion = "Xcode 3.2"; 173 | developmentRegion = English; 174 | hasScannedForEncodings = 0; 175 | knownRegions = ( 176 | en, 177 | Base, 178 | ); 179 | mainGroup = C0BB55681AEE8C850084259C; 180 | productRefGroup = C0BB55721AEE8C850084259C /* Products */; 181 | projectDirPath = ""; 182 | projectRoot = ""; 183 | targets = ( 184 | C0BB55701AEE8C850084259C /* QRCodeGen */, 185 | C0BB55851AEE8C850084259C /* QRCodeGenTests */, 186 | ); 187 | }; 188 | /* End PBXProject section */ 189 | 190 | /* Begin PBXResourcesBuildPhase section */ 191 | C0BB556F1AEE8C850084259C /* Resources */ = { 192 | isa = PBXResourcesBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | C0BB557C1AEE8C850084259C /* Main.storyboard in Resources */, 196 | C0BB55811AEE8C850084259C /* LaunchScreen.xib in Resources */, 197 | C0BB557E1AEE8C850084259C /* Images.xcassets in Resources */, 198 | ); 199 | runOnlyForDeploymentPostprocessing = 0; 200 | }; 201 | C0BB55841AEE8C850084259C /* Resources */ = { 202 | isa = PBXResourcesBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | ); 206 | runOnlyForDeploymentPostprocessing = 0; 207 | }; 208 | /* End PBXResourcesBuildPhase section */ 209 | 210 | /* Begin PBXSourcesBuildPhase section */ 211 | C0BB556D1AEE8C850084259C /* Sources */ = { 212 | isa = PBXSourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | C0BB55791AEE8C850084259C /* ViewController.swift in Sources */, 216 | C0BB55771AEE8C850084259C /* AppDelegate.swift in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | C0BB55821AEE8C850084259C /* Sources */ = { 221 | isa = PBXSourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | C0BB558D1AEE8C850084259C /* QRCodeGenTests.swift in Sources */, 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | }; 228 | /* End PBXSourcesBuildPhase section */ 229 | 230 | /* Begin PBXTargetDependency section */ 231 | C0BB55881AEE8C850084259C /* PBXTargetDependency */ = { 232 | isa = PBXTargetDependency; 233 | target = C0BB55701AEE8C850084259C /* QRCodeGen */; 234 | targetProxy = C0BB55871AEE8C850084259C /* PBXContainerItemProxy */; 235 | }; 236 | /* End PBXTargetDependency section */ 237 | 238 | /* Begin PBXVariantGroup section */ 239 | C0BB557A1AEE8C850084259C /* Main.storyboard */ = { 240 | isa = PBXVariantGroup; 241 | children = ( 242 | C0BB557B1AEE8C850084259C /* Base */, 243 | ); 244 | name = Main.storyboard; 245 | sourceTree = ""; 246 | }; 247 | C0BB557F1AEE8C850084259C /* LaunchScreen.xib */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | C0BB55801AEE8C850084259C /* Base */, 251 | ); 252 | name = LaunchScreen.xib; 253 | sourceTree = ""; 254 | }; 255 | /* End PBXVariantGroup section */ 256 | 257 | /* Begin XCBuildConfiguration section */ 258 | C0BB558E1AEE8C850084259C /* Debug */ = { 259 | isa = XCBuildConfiguration; 260 | buildSettings = { 261 | ALWAYS_SEARCH_USER_PATHS = NO; 262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 263 | CLANG_CXX_LIBRARY = "libc++"; 264 | CLANG_ENABLE_MODULES = YES; 265 | CLANG_ENABLE_OBJC_ARC = YES; 266 | CLANG_WARN_BOOL_CONVERSION = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 269 | CLANG_WARN_EMPTY_BODY = YES; 270 | CLANG_WARN_ENUM_CONVERSION = YES; 271 | CLANG_WARN_INT_CONVERSION = YES; 272 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 273 | CLANG_WARN_UNREACHABLE_CODE = YES; 274 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 275 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 276 | COPY_PHASE_STRIP = NO; 277 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 278 | ENABLE_STRICT_OBJC_MSGSEND = YES; 279 | GCC_C_LANGUAGE_STANDARD = gnu99; 280 | GCC_DYNAMIC_NO_PIC = NO; 281 | GCC_NO_COMMON_BLOCKS = YES; 282 | GCC_OPTIMIZATION_LEVEL = 0; 283 | GCC_PREPROCESSOR_DEFINITIONS = ( 284 | "DEBUG=1", 285 | "$(inherited)", 286 | ); 287 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 288 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 289 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 290 | GCC_WARN_UNDECLARED_SELECTOR = YES; 291 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 292 | GCC_WARN_UNUSED_FUNCTION = YES; 293 | GCC_WARN_UNUSED_VARIABLE = YES; 294 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 295 | MTL_ENABLE_DEBUG_INFO = YES; 296 | ONLY_ACTIVE_ARCH = YES; 297 | SDKROOT = iphoneos; 298 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 299 | }; 300 | name = Debug; 301 | }; 302 | C0BB558F1AEE8C850084259C /* Release */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 307 | CLANG_CXX_LIBRARY = "libc++"; 308 | CLANG_ENABLE_MODULES = YES; 309 | CLANG_ENABLE_OBJC_ARC = YES; 310 | CLANG_WARN_BOOL_CONVERSION = YES; 311 | CLANG_WARN_CONSTANT_CONVERSION = YES; 312 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 313 | CLANG_WARN_EMPTY_BODY = YES; 314 | CLANG_WARN_ENUM_CONVERSION = YES; 315 | CLANG_WARN_INT_CONVERSION = YES; 316 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 317 | CLANG_WARN_UNREACHABLE_CODE = YES; 318 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 319 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 320 | COPY_PHASE_STRIP = NO; 321 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 322 | ENABLE_NS_ASSERTIONS = NO; 323 | ENABLE_STRICT_OBJC_MSGSEND = YES; 324 | GCC_C_LANGUAGE_STANDARD = gnu99; 325 | GCC_NO_COMMON_BLOCKS = YES; 326 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 327 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 328 | GCC_WARN_UNDECLARED_SELECTOR = YES; 329 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 330 | GCC_WARN_UNUSED_FUNCTION = YES; 331 | GCC_WARN_UNUSED_VARIABLE = YES; 332 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 333 | MTL_ENABLE_DEBUG_INFO = NO; 334 | SDKROOT = iphoneos; 335 | VALIDATE_PRODUCT = YES; 336 | }; 337 | name = Release; 338 | }; 339 | C0BB55911AEE8C850084259C /* Debug */ = { 340 | isa = XCBuildConfiguration; 341 | buildSettings = { 342 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 343 | INFOPLIST_FILE = QRCodeGen/Info.plist; 344 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 345 | PRODUCT_NAME = "$(TARGET_NAME)"; 346 | }; 347 | name = Debug; 348 | }; 349 | C0BB55921AEE8C850084259C /* Release */ = { 350 | isa = XCBuildConfiguration; 351 | buildSettings = { 352 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 353 | INFOPLIST_FILE = QRCodeGen/Info.plist; 354 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 355 | PRODUCT_NAME = "$(TARGET_NAME)"; 356 | }; 357 | name = Release; 358 | }; 359 | C0BB55941AEE8C850084259C /* Debug */ = { 360 | isa = XCBuildConfiguration; 361 | buildSettings = { 362 | BUNDLE_LOADER = "$(TEST_HOST)"; 363 | FRAMEWORK_SEARCH_PATHS = ( 364 | "$(SDKROOT)/Developer/Library/Frameworks", 365 | "$(inherited)", 366 | ); 367 | GCC_PREPROCESSOR_DEFINITIONS = ( 368 | "DEBUG=1", 369 | "$(inherited)", 370 | ); 371 | INFOPLIST_FILE = QRCodeGenTests/Info.plist; 372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 373 | PRODUCT_NAME = "$(TARGET_NAME)"; 374 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/QRCodeGen.app/QRCodeGen"; 375 | }; 376 | name = Debug; 377 | }; 378 | C0BB55951AEE8C850084259C /* Release */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | BUNDLE_LOADER = "$(TEST_HOST)"; 382 | FRAMEWORK_SEARCH_PATHS = ( 383 | "$(SDKROOT)/Developer/Library/Frameworks", 384 | "$(inherited)", 385 | ); 386 | INFOPLIST_FILE = QRCodeGenTests/Info.plist; 387 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 388 | PRODUCT_NAME = "$(TARGET_NAME)"; 389 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/QRCodeGen.app/QRCodeGen"; 390 | }; 391 | name = Release; 392 | }; 393 | /* End XCBuildConfiguration section */ 394 | 395 | /* Begin XCConfigurationList section */ 396 | C0BB556C1AEE8C850084259C /* Build configuration list for PBXProject "QRCodeGen" */ = { 397 | isa = XCConfigurationList; 398 | buildConfigurations = ( 399 | C0BB558E1AEE8C850084259C /* Debug */, 400 | C0BB558F1AEE8C850084259C /* Release */, 401 | ); 402 | defaultConfigurationIsVisible = 0; 403 | defaultConfigurationName = Release; 404 | }; 405 | C0BB55901AEE8C850084259C /* Build configuration list for PBXNativeTarget "QRCodeGen" */ = { 406 | isa = XCConfigurationList; 407 | buildConfigurations = ( 408 | C0BB55911AEE8C850084259C /* Debug */, 409 | C0BB55921AEE8C850084259C /* Release */, 410 | ); 411 | defaultConfigurationIsVisible = 0; 412 | }; 413 | C0BB55931AEE8C850084259C /* Build configuration list for PBXNativeTarget "QRCodeGenTests" */ = { 414 | isa = XCConfigurationList; 415 | buildConfigurations = ( 416 | C0BB55941AEE8C850084259C /* Debug */, 417 | C0BB55951AEE8C850084259C /* Release */, 418 | ); 419 | defaultConfigurationIsVisible = 0; 420 | }; 421 | /* End XCConfigurationList section */ 422 | }; 423 | rootObject = C0BB55691AEE8C850084259C /* Project object */; 424 | } 425 | -------------------------------------------------------------------------------- /QRCodeGen.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /QRCodeGen.xcodeproj/xcuserdata/gabriel.xcuserdatad/xcschemes/QRCodeGen.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /QRCodeGen.xcodeproj/xcuserdata/gabriel.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | QRCodeGen.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C0BB55701AEE8C850084259C 16 | 17 | primary 18 | 19 | 20 | C0BB55851AEE8C850084259C 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /QRCodeGen.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/QRCodeGen.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /QRCodeGen.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | QRCodeGen.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C0BB55701AEE8C850084259C 16 | 17 | primary 18 | 19 | 20 | C0BB55851AEE8C850084259C 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /QRCodeGen/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // QRCodeGen 4 | // 5 | // Created by Gabriel Theodoropoulos on 27/4/15. 6 | // Copyright (c) 2015 Appcoda. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /QRCodeGen/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /QRCodeGen/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 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /QRCodeGen/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" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /QRCodeGen/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.appcoda.$(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 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /QRCodeGen/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // QRCodeGen 4 | // 5 | // Created by Gabriel Theodoropoulos on 27/4/15. 6 | // Copyright (c) 2015 Appcoda. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet weak var textField: UITextField! 14 | 15 | @IBOutlet weak var imgQRCode: UIImageView! 16 | 17 | @IBOutlet weak var btnAction: UIButton! 18 | 19 | @IBOutlet weak var slider: UISlider! 20 | 21 | 22 | var qrcodeImage: CIImage! 23 | 24 | 25 | override func viewDidLoad() { 26 | super.viewDidLoad() 27 | // Do any additional setup after loading the view, typically from a nib. 28 | } 29 | 30 | override func didReceiveMemoryWarning() { 31 | super.didReceiveMemoryWarning() 32 | // Dispose of any resources that can be recreated. 33 | } 34 | 35 | 36 | // MARK: IBAction method implementation 37 | 38 | @IBAction func performButtonAction(sender: AnyObject) { 39 | if qrcodeImage == nil { 40 | if textField.text == "" { 41 | return 42 | } 43 | 44 | let data = textField.text.dataUsingEncoding(NSISOLatin1StringEncoding, allowLossyConversion: false) 45 | 46 | let filter = CIFilter(name: "CIQRCodeGenerator") 47 | 48 | filter.setValue(data, forKey: "inputMessage") 49 | filter.setValue("Q", forKey: "inputCorrectionLevel") 50 | 51 | qrcodeImage = filter.outputImage 52 | 53 | textField.resignFirstResponder() 54 | 55 | btnAction.setTitle("Clear", forState: UIControlState.Normal) 56 | 57 | displayQRCodeImage() 58 | } 59 | else { 60 | imgQRCode.image = nil 61 | qrcodeImage = nil 62 | btnAction.setTitle("Generate", forState: UIControlState.Normal) 63 | } 64 | 65 | textField.enabled = !textField.enabled 66 | slider.hidden = !slider.hidden 67 | } 68 | 69 | 70 | @IBAction func changeImageViewScale(sender: AnyObject) { 71 | imgQRCode.transform = CGAffineTransformMakeScale(CGFloat(slider.value), CGFloat(slider.value)) 72 | } 73 | 74 | 75 | // MARK: Custom method implementation 76 | 77 | func displayQRCodeImage() { 78 | let scaleX = imgQRCode.frame.size.width / qrcodeImage.extent().size.width 79 | let scaleY = imgQRCode.frame.size.height / qrcodeImage.extent().size.height 80 | 81 | let transformedImage = qrcodeImage.imageByApplyingTransform(CGAffineTransformMakeScale(scaleX, scaleY)) 82 | 83 | imgQRCode.image = UIImage(CIImage: transformedImage) 84 | } 85 | 86 | 87 | } 88 | 89 | -------------------------------------------------------------------------------- /QRCodeGenTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.appcoda.$(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 | -------------------------------------------------------------------------------- /QRCodeGenTests/QRCodeGenTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // QRCodeGenTests.swift 3 | // QRCodeGenTests 4 | // 5 | // Created by Gabriel Theodoropoulos on 27/4/15. 6 | // Copyright (c) 2015 Appcoda. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class QRCodeGenTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A demo app for QR Code Generation 2 | 3 | Prior to iOS 7, making a QR code generator was a real trouble. Not many resources existed back then, and most developers had to avoid creating their custom code; the easiest thing to do was to pick among 2-3 different existing libraries and fit it to their applications. But thankfully, all that is now history. By introducing iOS 7 time ago, Apple also turned any task related to QR codes (reading and generating) into a piece of cake. For reading QR codes, the AVFoundation framework is now the tool every developer needs. For generating, the only thing coders have to do is to use the Core Image framework, and more specifically the Core Image filters. 4 | 5 | To make it perfectly clear, since iOS 7 a QR code is generated as a CIImage object (CoreImage image) simply by using a special filter named CIQRCodeGenerator. All it takes is to provide the data that you want to convert into a QR code image, and iOS will manage and do the heavy work. 6 | 7 | For details, please refer to this tutorial: 8 | 9 | http://www.appcoda.com/qr-code-generator-tutorial 10 | --------------------------------------------------------------------------------