From 10e87f15c9102585bf5eb1ac29b2761cf0083e62 Mon Sep 17 00:00:00 2001 From: Yannick Loriot Date: Thu, 8 Sep 2016 13:36:11 +0200 Subject: [PATCH] Adding SPM supports --- CHANGELOG.md | 9 +- .../project.pbxproj | 130 +++++++++--------- Package.swift | 31 +++++ QRCodeReader.swift.podspec | 2 +- README.md | 20 ++- {QRCodeReader => Sources}/QRCodeReader.swift | 0 .../QRCodeReaderResult.swift | 0 .../QRCodeReaderViewController.swift | 0 .../QRCodeReaderViewControllerBuilder.swift | 0 .../ReaderOverlayView.swift | 0 .../SwitchCameraButton.swift | 0 .../ToggleTorchButton.swift | 0 12 files changed, 121 insertions(+), 71 deletions(-) create mode 100644 Package.swift rename {QRCodeReader => Sources}/QRCodeReader.swift (100%) rename {QRCodeReader => Sources}/QRCodeReaderResult.swift (100%) rename {QRCodeReader => Sources}/QRCodeReaderViewController.swift (100%) rename {QRCodeReader => Sources}/QRCodeReaderViewControllerBuilder.swift (100%) rename {QRCodeReader => Sources}/ReaderOverlayView.swift (100%) rename {QRCodeReader => Sources}/SwitchCameraButton.swift (100%) rename {QRCodeReader => Sources}/ToggleTorchButton.swift (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d552c2..01cf049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,9 @@ Released on 2016-06-15. **Swift 3 supports** -- Use `QRCodeReaderViewControllerBuilder` instead of `QRCodeViewControllerBuilder` -- Remove all deprecated apis +- [REFACTORING] Use `QRCodeReaderViewControllerBuilder` instead of `QRCodeViewControllerBuilder` +- [REFACTORING] Remove all deprecated apis +- [ADD] Swift Package Manager supports `QRCodeReader`: - Use `didFindCode` instead of `didFindCodeBlock` @@ -18,12 +19,12 @@ Released on 2016-06-15. ## [Version 6.2.0](https://github.com/yannickl/QRCodeReader.swift/releases/tag/6.2.0) Released on 2016-09-08. -- Deprecating all initializers expect `initWithBuilder` in order to remove them in the next version +- [REFACTORING] Deprecating all initializers expect `initWithBuilder` in order to remove them in the next version ## [Version 6.1.0](https://github.com/yannickl/QRCodeReader.swift/releases/tag/6.1.0) Released on 2016-08-03. -- Hide/Display cancel button +- [ADD] Hide/Display cancel button ## [Version 6.0.0](https://github.com/yannickl/QRCodeReader.swift/releases/tag/6.0.0) Released on 2016-03-22. diff --git a/Example/QRCodeReader.swift.xcodeproj/project.pbxproj b/Example/QRCodeReader.swift.xcodeproj/project.pbxproj index 415d480..25cb44e 100644 --- a/Example/QRCodeReader.swift.xcodeproj/project.pbxproj +++ b/Example/QRCodeReader.swift.xcodeproj/project.pbxproj @@ -7,36 +7,36 @@ objects = { /* Begin PBXBuildFile section */ - 4A0723DC1C223D8100F2C410 /* QRCodeReaderResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A0723DB1C223D8100F2C410 /* QRCodeReaderResult.swift */; }; - 4A0723DD1C22405100F2C410 /* QRCodeReaderResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A0723DB1C223D8100F2C410 /* QRCodeReaderResult.swift */; }; - 82BD4A0A1BBC21F800172E4E /* ToggleTorchButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82BD4A091BBC21F800172E4E /* ToggleTorchButton.swift */; }; - 82D83BA71BBC2A3100C94C22 /* ToggleTorchButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82BD4A091BBC21F800172E4E /* ToggleTorchButton.swift */; }; - CE3230341D114B980077DF14 /* QRCodeReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = CED23DDB1A15079300BE7A72 /* QRCodeReader.swift */; }; - CE3230351D114BAA0077DF14 /* QRCodeReaderResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A0723DB1C223D8100F2C410 /* QRCodeReaderResult.swift */; }; - CE3230361D114BAA0077DF14 /* SwitchCameraButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CED23DDD1A1507CB00BE7A72 /* SwitchCameraButton.swift */; }; - CE3230371D114BAA0077DF14 /* ReaderOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CECCE4CC1A1527DE00071669 /* ReaderOverlayView.swift */; }; - CE3230381D114BAA0077DF14 /* QRCodeReaderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CECD170A1AA3531C00A9ACDE /* QRCodeReaderViewController.swift */; }; - CE3230391D114BAA0077DF14 /* ToggleTorchButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82BD4A091BBC21F800172E4E /* ToggleTorchButton.swift */; }; - CE345B231C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE345B221C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift */; }; - CE345B241C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE345B221C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift */; }; - CE345B251C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE345B221C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift */; }; CE412E8F19D9A1E4000F294E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE412E8E19D9A1E4000F294E /* AppDelegate.swift */; }; CE412E9119D9A1E4000F294E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE412E9019D9A1E4000F294E /* ViewController.swift */; }; CE412E9419D9A1E4000F294E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE412E9219D9A1E4000F294E /* Main.storyboard */; }; CE412E9619D9A1E4000F294E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE412E9519D9A1E4000F294E /* Images.xcassets */; }; CE412E9919D9A1E4000F294E /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE412E9719D9A1E4000F294E /* LaunchScreen.xib */; }; CE412EA519D9A1E4000F294E /* QRCodeReader_swiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE412EA419D9A1E4000F294E /* QRCodeReader_swiftTests.swift */; }; + CE4E1EDA1D81838F00D2AC35 /* QRCodeReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED31D81838F00D2AC35 /* QRCodeReader.swift */; }; + CE4E1EDB1D81838F00D2AC35 /* QRCodeReaderResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED41D81838F00D2AC35 /* QRCodeReaderResult.swift */; }; + CE4E1EDC1D81838F00D2AC35 /* QRCodeReaderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED51D81838F00D2AC35 /* QRCodeReaderViewController.swift */; }; + CE4E1EDD1D81838F00D2AC35 /* QRCodeReaderViewControllerBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED61D81838F00D2AC35 /* QRCodeReaderViewControllerBuilder.swift */; }; + CE4E1EDE1D81838F00D2AC35 /* ReaderOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED71D81838F00D2AC35 /* ReaderOverlayView.swift */; }; + CE4E1EDF1D81838F00D2AC35 /* SwitchCameraButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED81D81838F00D2AC35 /* SwitchCameraButton.swift */; }; + CE4E1EE01D81838F00D2AC35 /* ToggleTorchButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED91D81838F00D2AC35 /* ToggleTorchButton.swift */; }; + CE4E1EE11D81839D00D2AC35 /* QRCodeReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED31D81838F00D2AC35 /* QRCodeReader.swift */; }; + CE4E1EE21D81839D00D2AC35 /* QRCodeReaderResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED41D81838F00D2AC35 /* QRCodeReaderResult.swift */; }; + CE4E1EE31D81839D00D2AC35 /* QRCodeReaderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED51D81838F00D2AC35 /* QRCodeReaderViewController.swift */; }; + CE4E1EE41D81839D00D2AC35 /* QRCodeReaderViewControllerBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED61D81838F00D2AC35 /* QRCodeReaderViewControllerBuilder.swift */; }; + CE4E1EE51D81839D00D2AC35 /* ReaderOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED71D81838F00D2AC35 /* ReaderOverlayView.swift */; }; + CE4E1EE61D81839D00D2AC35 /* SwitchCameraButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED81D81838F00D2AC35 /* SwitchCameraButton.swift */; }; + CE4E1EE71D81839D00D2AC35 /* ToggleTorchButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED91D81838F00D2AC35 /* ToggleTorchButton.swift */; }; + CE4E1EE81D81839D00D2AC35 /* QRCodeReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED31D81838F00D2AC35 /* QRCodeReader.swift */; }; + CE4E1EE91D81839D00D2AC35 /* QRCodeReaderResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED41D81838F00D2AC35 /* QRCodeReaderResult.swift */; }; + CE4E1EEA1D81839D00D2AC35 /* QRCodeReaderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED51D81838F00D2AC35 /* QRCodeReaderViewController.swift */; }; + CE4E1EEB1D81839D00D2AC35 /* QRCodeReaderViewControllerBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED61D81838F00D2AC35 /* QRCodeReaderViewControllerBuilder.swift */; }; + CE4E1EEC1D81839D00D2AC35 /* ReaderOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED71D81838F00D2AC35 /* ReaderOverlayView.swift */; }; + CE4E1EED1D81839D00D2AC35 /* SwitchCameraButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED81D81838F00D2AC35 /* SwitchCameraButton.swift */; }; + CE4E1EEE1D81839D00D2AC35 /* ToggleTorchButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4E1ED91D81838F00D2AC35 /* ToggleTorchButton.swift */; }; CE8FFED91BAB4E7F00D43F38 /* QRCodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = CE8FFED81BAB4E7F00D43F38 /* QRCodeReader.h */; settings = {ATTRIBUTES = (Public, ); }; }; CE8FFEEB1BAB4E7F00D43F38 /* QRCodeReader.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE8FFED61BAB4E7F00D43F38 /* QRCodeReader.framework */; }; CE8FFEEC1BAB4E7F00D43F38 /* QRCodeReader.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CE8FFED61BAB4E7F00D43F38 /* QRCodeReader.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - CE8FFEF41BAB4F5400D43F38 /* QRCodeReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = CED23DDB1A15079300BE7A72 /* QRCodeReader.swift */; }; - CE8FFEF51BAB4F5400D43F38 /* SwitchCameraButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CED23DDD1A1507CB00BE7A72 /* SwitchCameraButton.swift */; }; - CE8FFEF61BAB4F5400D43F38 /* ReaderOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CECCE4CC1A1527DE00071669 /* ReaderOverlayView.swift */; }; - CE8FFEF71BAB4F5400D43F38 /* QRCodeReaderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CECD170A1AA3531C00A9ACDE /* QRCodeReaderViewController.swift */; }; - CECCE4CD1A1527DE00071669 /* ReaderOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CECCE4CC1A1527DE00071669 /* ReaderOverlayView.swift */; }; - CECD170B1AA3531C00A9ACDE /* QRCodeReaderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CECD170A1AA3531C00A9ACDE /* QRCodeReaderViewController.swift */; }; - CED23DDC1A15079300BE7A72 /* QRCodeReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = CED23DDB1A15079300BE7A72 /* QRCodeReader.swift */; }; - CED23DDE1A1507CB00BE7A72 /* SwitchCameraButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CED23DDD1A1507CB00BE7A72 /* SwitchCameraButton.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -71,9 +71,6 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 4A0723DB1C223D8100F2C410 /* QRCodeReaderResult.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRCodeReaderResult.swift; sourceTree = ""; }; - 82BD4A091BBC21F800172E4E /* ToggleTorchButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToggleTorchButton.swift; sourceTree = ""; }; - CE345B221C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRCodeReaderViewControllerBuilder.swift; sourceTree = ""; }; CE412E8919D9A1E4000F294E /* QRCodeReader.swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = QRCodeReader.swift.app; sourceTree = BUILT_PRODUCTS_DIR; }; CE412E8D19D9A1E4000F294E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; CE412E8E19D9A1E4000F294E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -84,14 +81,17 @@ CE412E9E19D9A1E4000F294E /* QRCodeReader.swiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QRCodeReader.swiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; CE412EA319D9A1E4000F294E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; CE412EA419D9A1E4000F294E /* QRCodeReader_swiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRCodeReader_swiftTests.swift; sourceTree = ""; }; + CE4E1ED31D81838F00D2AC35 /* QRCodeReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRCodeReader.swift; sourceTree = ""; }; + CE4E1ED41D81838F00D2AC35 /* QRCodeReaderResult.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRCodeReaderResult.swift; sourceTree = ""; }; + CE4E1ED51D81838F00D2AC35 /* QRCodeReaderViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRCodeReaderViewController.swift; sourceTree = ""; }; + CE4E1ED61D81838F00D2AC35 /* QRCodeReaderViewControllerBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRCodeReaderViewControllerBuilder.swift; sourceTree = ""; }; + CE4E1ED71D81838F00D2AC35 /* ReaderOverlayView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReaderOverlayView.swift; sourceTree = ""; }; + CE4E1ED81D81838F00D2AC35 /* SwitchCameraButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwitchCameraButton.swift; sourceTree = ""; }; + CE4E1ED91D81838F00D2AC35 /* ToggleTorchButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToggleTorchButton.swift; sourceTree = ""; }; CE8FFED61BAB4E7F00D43F38 /* QRCodeReader.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = QRCodeReader.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CE8FFED81BAB4E7F00D43F38 /* QRCodeReader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QRCodeReader.h; sourceTree = ""; }; CE8FFEDA1BAB4E7F00D43F38 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; CEC20A861A14EF0D00E7D0AD /* CameraSwitchIcon.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; name = CameraSwitchIcon.playground; path = resources/CameraSwitchIcon.playground; sourceTree = ""; }; - CECCE4CC1A1527DE00071669 /* ReaderOverlayView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReaderOverlayView.swift; sourceTree = ""; }; - CECD170A1AA3531C00A9ACDE /* QRCodeReaderViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRCodeReaderViewController.swift; sourceTree = ""; }; - CED23DDB1A15079300BE7A72 /* QRCodeReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRCodeReader.swift; sourceTree = ""; }; - CED23DDD1A1507CB00BE7A72 /* SwitchCameraButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwitchCameraButton.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -123,7 +123,7 @@ CE412E8019D9A1E4000F294E = { isa = PBXGroup; children = ( - CED23DDA1A15079300BE7A72 /* QRCodeReader */, + CE4E1ED21D81838F00D2AC35 /* QRCodeReader */, CE412E8B19D9A1E4000F294E /* Example */, CE412EA119D9A1E4000F294E /* ExampleTests */, CEC20A871A14EF1400E7D0AD /* Resources */, @@ -182,6 +182,21 @@ name = "Supporting Files"; sourceTree = ""; }; + CE4E1ED21D81838F00D2AC35 /* QRCodeReader */ = { + isa = PBXGroup; + children = ( + CE4E1ED31D81838F00D2AC35 /* QRCodeReader.swift */, + CE4E1ED41D81838F00D2AC35 /* QRCodeReaderResult.swift */, + CE4E1ED51D81838F00D2AC35 /* QRCodeReaderViewController.swift */, + CE4E1ED61D81838F00D2AC35 /* QRCodeReaderViewControllerBuilder.swift */, + CE4E1ED71D81838F00D2AC35 /* ReaderOverlayView.swift */, + CE4E1ED81D81838F00D2AC35 /* SwitchCameraButton.swift */, + CE4E1ED91D81838F00D2AC35 /* ToggleTorchButton.swift */, + ); + name = QRCodeReader; + path = ../Sources; + sourceTree = ""; + }; CE8FFED71BAB4E7F00D43F38 /* QRCodeReader */ = { isa = PBXGroup; children = ( @@ -199,21 +214,6 @@ name = Resources; sourceTree = ""; }; - CED23DDA1A15079300BE7A72 /* QRCodeReader */ = { - isa = PBXGroup; - children = ( - CED23DDB1A15079300BE7A72 /* QRCodeReader.swift */, - 4A0723DB1C223D8100F2C410 /* QRCodeReaderResult.swift */, - CECD170A1AA3531C00A9ACDE /* QRCodeReaderViewController.swift */, - CE345B221C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift */, - CECCE4CC1A1527DE00071669 /* ReaderOverlayView.swift */, - CED23DDD1A1507CB00BE7A72 /* SwitchCameraButton.swift */, - 82BD4A091BBC21F800172E4E /* ToggleTorchButton.swift */, - ); - name = QRCodeReader; - path = ../QRCodeReader; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -360,14 +360,14 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - CECD170B1AA3531C00A9ACDE /* QRCodeReaderViewController.swift in Sources */, + CE4E1EE01D81838F00D2AC35 /* ToggleTorchButton.swift in Sources */, + CE4E1EDF1D81838F00D2AC35 /* SwitchCameraButton.swift in Sources */, CE412E9119D9A1E4000F294E /* ViewController.swift in Sources */, - 82BD4A0A1BBC21F800172E4E /* ToggleTorchButton.swift in Sources */, - 4A0723DC1C223D8100F2C410 /* QRCodeReaderResult.swift in Sources */, - CECCE4CD1A1527DE00071669 /* ReaderOverlayView.swift in Sources */, - CE345B231C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift in Sources */, - CED23DDC1A15079300BE7A72 /* QRCodeReader.swift in Sources */, - CED23DDE1A1507CB00BE7A72 /* SwitchCameraButton.swift in Sources */, + CE4E1EDA1D81838F00D2AC35 /* QRCodeReader.swift in Sources */, + CE4E1EDE1D81838F00D2AC35 /* ReaderOverlayView.swift in Sources */, + CE4E1EDC1D81838F00D2AC35 /* QRCodeReaderViewController.swift in Sources */, + CE4E1EDB1D81838F00D2AC35 /* QRCodeReaderResult.swift in Sources */, + CE4E1EDD1D81838F00D2AC35 /* QRCodeReaderViewControllerBuilder.swift in Sources */, CE412E8F19D9A1E4000F294E /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -376,14 +376,14 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - CE3230391D114BAA0077DF14 /* ToggleTorchButton.swift in Sources */, - CE3230371D114BAA0077DF14 /* ReaderOverlayView.swift in Sources */, - CE345B241C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift in Sources */, - CE3230361D114BAA0077DF14 /* SwitchCameraButton.swift in Sources */, - CE3230341D114B980077DF14 /* QRCodeReader.swift in Sources */, + CE4E1EE71D81839D00D2AC35 /* ToggleTorchButton.swift in Sources */, + CE4E1EE51D81839D00D2AC35 /* ReaderOverlayView.swift in Sources */, + CE4E1EE61D81839D00D2AC35 /* SwitchCameraButton.swift in Sources */, + CE4E1EE21D81839D00D2AC35 /* QRCodeReaderResult.swift in Sources */, + CE4E1EE41D81839D00D2AC35 /* QRCodeReaderViewControllerBuilder.swift in Sources */, + CE4E1EE11D81839D00D2AC35 /* QRCodeReader.swift in Sources */, + CE4E1EE31D81839D00D2AC35 /* QRCodeReaderViewController.swift in Sources */, CE412EA519D9A1E4000F294E /* QRCodeReader_swiftTests.swift in Sources */, - CE3230381D114BAA0077DF14 /* QRCodeReaderViewController.swift in Sources */, - CE3230351D114BAA0077DF14 /* QRCodeReaderResult.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -391,13 +391,13 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - CE345B251C444D6400FCC482 /* QRCodeReaderViewControllerBuilder.swift in Sources */, - 4A0723DD1C22405100F2C410 /* QRCodeReaderResult.swift in Sources */, - 82D83BA71BBC2A3100C94C22 /* ToggleTorchButton.swift in Sources */, - CE8FFEF41BAB4F5400D43F38 /* QRCodeReader.swift in Sources */, - CE8FFEF51BAB4F5400D43F38 /* SwitchCameraButton.swift in Sources */, - CE8FFEF61BAB4F5400D43F38 /* ReaderOverlayView.swift in Sources */, - CE8FFEF71BAB4F5400D43F38 /* QRCodeReaderViewController.swift in Sources */, + CE4E1EEC1D81839D00D2AC35 /* ReaderOverlayView.swift in Sources */, + CE4E1EEA1D81839D00D2AC35 /* QRCodeReaderViewController.swift in Sources */, + CE4E1EEB1D81839D00D2AC35 /* QRCodeReaderViewControllerBuilder.swift in Sources */, + CE4E1EE81D81839D00D2AC35 /* QRCodeReader.swift in Sources */, + CE4E1EED1D81839D00D2AC35 /* SwitchCameraButton.swift in Sources */, + CE4E1EEE1D81839D00D2AC35 /* ToggleTorchButton.swift in Sources */, + CE4E1EE91D81839D00D2AC35 /* QRCodeReaderResult.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..452778b --- /dev/null +++ b/Package.swift @@ -0,0 +1,31 @@ +// +// QRCodeReader.swift +// +// Copyright 2014-present Yannick Loriot. +// http://yannickloriot.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import PackageDescription + +let package = Package( + name: "QRCodeReader" +) + diff --git a/QRCodeReader.swift.podspec b/QRCodeReader.swift.podspec index d26c89e..81bc2a5 100644 --- a/QRCodeReader.swift.podspec +++ b/QRCodeReader.swift.podspec @@ -13,6 +13,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = '8.0' s.framework = 'AVFoundation' - s.source_files = 'QRCodeReader/*.swift' + s.source_files = 'Sources/*.swift' s.requires_arc = true end diff --git a/README.md b/README.md index 1d97f76..683c5f5 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ It provides a default view controller to display the camera view with the scan a ![screenshot](http://yannickloriot.com/resources/qrcodereader.swift-screenshot.jpg) -*Note: the v4.x or over are compatibles with swift 1.2, use the v3 with Xcode 6.2 or lower.* +*Note: the v6.x supports the Swift 2.2.* ## Usage @@ -103,6 +103,24 @@ To integrate `QRCodeReader` into your Xcode project using Carthage, specify it i github "yannickl/QRCodeReader.swift" >= 7.0.0 ``` +#### Swift Package Manager + +You can use [The Swift Package Manager](https://swift.org/package-manager) to install `QRCodeReader.swift` by adding the proper description to your `Package.swift` file: + +```swift +import PackageDescription + +let package = Package( + name: "YOUR_PROJECT_NAME", + targets: [], + dependencies: [ + .Package(url: "https://github.com/yannickl/QRCodeReader.swift.git", versions: "7.0.0" ..< Version.max) + ] +) +``` + +Note that the [Swift Package Manager](https://swift.org/package-manager) is still in early design and development, for more information checkout its [GitHub Page](https://github.com/apple/swift-package-manager) + #### Manually [Download](https://github.com/YannickL/QRCodeReader.swift/archive/master.zip) the project and copy the `QRCodeReader` folder into your project to use it in. diff --git a/QRCodeReader/QRCodeReader.swift b/Sources/QRCodeReader.swift similarity index 100% rename from QRCodeReader/QRCodeReader.swift rename to Sources/QRCodeReader.swift diff --git a/QRCodeReader/QRCodeReaderResult.swift b/Sources/QRCodeReaderResult.swift similarity index 100% rename from QRCodeReader/QRCodeReaderResult.swift rename to Sources/QRCodeReaderResult.swift diff --git a/QRCodeReader/QRCodeReaderViewController.swift b/Sources/QRCodeReaderViewController.swift similarity index 100% rename from QRCodeReader/QRCodeReaderViewController.swift rename to Sources/QRCodeReaderViewController.swift diff --git a/QRCodeReader/QRCodeReaderViewControllerBuilder.swift b/Sources/QRCodeReaderViewControllerBuilder.swift similarity index 100% rename from QRCodeReader/QRCodeReaderViewControllerBuilder.swift rename to Sources/QRCodeReaderViewControllerBuilder.swift diff --git a/QRCodeReader/ReaderOverlayView.swift b/Sources/ReaderOverlayView.swift similarity index 100% rename from QRCodeReader/ReaderOverlayView.swift rename to Sources/ReaderOverlayView.swift diff --git a/QRCodeReader/SwitchCameraButton.swift b/Sources/SwitchCameraButton.swift similarity index 100% rename from QRCodeReader/SwitchCameraButton.swift rename to Sources/SwitchCameraButton.swift diff --git a/QRCodeReader/ToggleTorchButton.swift b/Sources/ToggleTorchButton.swift similarity index 100% rename from QRCodeReader/ToggleTorchButton.swift rename to Sources/ToggleTorchButton.swift