/ Scanning

A credit card scanner with swift

A credit card scanner with swift

CardScanner

A credit card scanner.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

CardScanner

Requirements

  • iOS 13 or newer
  • Swift 5

Installation

CardScanner is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'CardScanner'

To Use:

import CardScanner 

And simple call

let scannerView = CardScanner.getScanner { card, date, cvv in
    self.resultsLabel.text = "\(card) \(date) \(cvv)"
}
present(scannerView, animated: true, completion: nil)

Do not forget add NSCameraUsageDescription to your Info.plist

You can custom the texts using the scannerView.:

  • hintTopText
  • hintBottomText
  • buttonConfirmTitle
  • buttonConfirmBackgroundColor

Author

Narlei Moreira, [email protected]

GitHub

Comments