5

I want to scan a credit card on an iOS app. I used CardIO Framework but it is not working on ios13

guard let cardIOVC = CardIOPaymentViewController(paymentDelegate: self) else { 
            print("This device is incompatible with CardIO")
            return
        }

        cardIOVC.collectCVV = false
        cardIOVC.modalPresentationStyle = .overCurrentContext
        present(cardIOVC, animated: true, completion: nil)

So I was wondering what the best way to implement CardIO without displaying the built-in preloaded view when cardInfo is provided.

guard let cardIOVC = ScanViewController.createViewController(withDelegate: self) else {
        print("This device is incompatible with CardScan")
        return
    }
    cardIOVC.allowSkip = true
    present(cardIOVC, animated: true, completion: nil)

thus cardScan Library but neither the expiryDate nor name card Holder is returned. I'm not really sure if the chunk of code I developed misses Something to configure the creditInfo callback.

I also tested the DyScan Framework as an update of CardIO API however there no podSpec available:DyscanIntegrationGuide

Does iOS provide any public API for developers to scan credit cards ? Or is there any better solutions ?

Paulw11
  • 108,386
  • 14
  • 159
  • 186
OMhz
  • 51
  • 1
  • 3
  • 1
    Hi, I'm looking into this but cannot understand exactly what's the underlying issue. How does your ScanViewController look like? Also, you mention that the framework is not working on iOS 13 - I've created a fork and updated it for the latest Xcode and have no issues running it on iOS 13: https://github.com/Cerovec/card.io-iOS-SDK – Cerovec Apr 11 '20 at 18:52
  • Can confirm that CardIO is still working on iOS 14 – AMAN77 Nov 11 '20 at 10:23

1 Answers1

0

Basically you can create your own, the steps are

  1. Extract the text from the image using VisionKit, Tesseract, AWS Textract etc.,.

  2. Get the normalised coordinates of the recognized text

  3. Train a mlmodel using CoreML, SciKit learn etc., with normalized locations of various card details like 16 digit, card name, expiry etc.

  4. Predict the normalized value in step 2 against the trained model in step 3.

Works decent as I did one of the same kind.