Latest 0.9.1
Homepage https://github.com/csikigeza/SCTqrScanner
License MIT
Platforms ios 10.0
Authors

Logo

The SCTqrScanner read special QR codes created for SEPA Credit Transfer. After scan the reader returns the info from QR in special SCTqrResult. This Result contains the name and the IBAN (Mandatory fileds), bic, amount, purpose, remittance or reference, which are optional fields

xCode
Swift
License
Platform

Requirements

  • iOS 10.0+
  • Xcode 10.1+
  • Swift 4.2+

Screens

Screen2Screen3Screen4

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate SCTqrScanner into your xCode project using CocoaPods, specify it in your Podfile:

pod 'SCTqrScanner'

Install into your project:

$ pod install

Open your project in xCode from the .xcworkspace file (not the usual project file):

$ open MyProject.xcworkspace

You can now import SCTqrScanner framework into your files.

Usage

SInce iOS10+, you will need the permision from user for the camera usage.
For that you will need to add the Privacy – Camera Usage Description (NSCameraUsageDescription) field in your Info.plist file.

Create your own codeReader and videoLayer properties on the ViewController on which you want to use the SCTqrScanner.

private var codeReader = SCTqrScanner()
private var videoLayer: CALayer!

Also you need a IBOutlet for the camera preview:

@IBOutlet weak var videoPreview: UIView!

Start the SCTqrScanner in viewWillAppear and handl the response.

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    codeReader.startReading { [weak self] (qrResult) in
            //TODO: use response
    }
}

The qrResult can be nil, if the QR does not conform to the SEPA Credit Transfer Standards defined from European Payments Council (See SCT Standards).
Otherwise the respons has SCTqrResult type.

SCTqrResult contains obligatory the name and iban.

Assign the Camera preview to your view in viewDidload:

override func viewDidLoad() {
    super.viewDidLoad()
    videoLayer = codeReader.videoPreview
    videoPreview.layer.addSublayer(videoLayer)
}

License

SCTqrScanner is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "SCTqrScanner",
    "platforms": {
        "ios": "10.0"
    },
    "summary": "iOS Scanner for the SEPA Credit Transfer Quick Response Code",
    "description": "The SCTqrScanner read special QR codes  created for SEPA Credit Transfer. After scan the reader returns the info from QR in special SCTqrResult. This Result contains the name and the IBAN (Mandatory fileds), bic, amount, purpose, remittance or reference, which are optional fields",
    "version": "0.9.1",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Geza Csiki": "[email protected]"
    },
    "homepage": "https://github.com/csikigeza/SCTqrScanner",
    "source": {
        "git": "https://github.com/csikigeza/SCTqrScanner.git",
        "tag": "0.9.1"
    },
    "source_files": "SCTqrScanner/**/*.{h,swift}",
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This