Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with iPhone X/XR-XS/11-11 Pro Max (iOS 13.3) #39

Open
GlebZheglovZ opened this issue Jan 29, 2020 · 1 comment
Open

Issue with iPhone X/XR-XS/11-11 Pro Max (iOS 13.3) #39

GlebZheglovZ opened this issue Jan 29, 2020 · 1 comment

Comments

@GlebZheglovZ
Copy link

GlebZheglovZ commented Jan 29, 2020

iOS: 13.3
PayCards version: 1.1.7 (Installed using Cocoapods)

Issue Description: When the card is scanned, the camera does not detect the left and right edges of the credit card. However, it normally recognizes the upper and lower bounds. This problem is only observed on iPhone X, XR/XS, 11-11 Pro Max.

Everything works fine on iPhone 6S/SE

Founded similar problem

import Foundation
import PayCardsRecognizer

protocol CardRecognizerDelegate: class {
    func didReceivedCreditCardData(cardNumber: String,
                     cardholderName: String,
                     monthExp: String,
                     yearExp: String)
}

class CardRecognizer {

    var recognizer: PayCardsRecognizer!
    weak var delegate: CardRecognizerDelegate!
  
    init(forView view: UIView) {
        recognizer = PayCardsRecognizer(delegate: self,
                                        resultMode: .async,
                                        container: view,
                                        frameColor: .green)
    }
    
}

extension CardRecognizer: PayCardsRecognizerPlatformDelegate {
    func payCardsRecognizer(_ payCardsRecognizer: PayCardsRecognizer, didRecognize result: PayCardsRecognizerResult) {
        self.delegate.didReceivedCreditCardData(cardNumber: result.recognizedNumber ?? "",
                                  cardholderName: result.recognizedHolderName ?? "",
                                  monthExp: result.recognizedExpireDateMonth ?? "",
                                  yearExp: result.recognizedExpireDateYear ?? "")
    }
}
@GlebZheglovZ GlebZheglovZ changed the title Not working on iPhone X, XR, 11 Not working on iPhone X/XR-XS/11-11 Pro Max, Jan 29, 2020
@GlebZheglovZ GlebZheglovZ changed the title Not working on iPhone X/XR-XS/11-11 Pro Max, Not working on iPhone X/XR-XS/11-11 Pro Max Jan 29, 2020
@GlebZheglovZ GlebZheglovZ changed the title Not working on iPhone X/XR-XS/11-11 Pro Max Issue with iPhone X/XR-XS/11-11 Pro Max (iOS 13.3) Jan 29, 2020
@gosis
Copy link

gosis commented Apr 17, 2020

You can set the PayCardsRecognizer container view height to be half of the screen size as seen in the example project here https://github.com/faceterteam/PayCards_iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants