getbouncer / cardscan-ios Goto Github PK
View Code? Open in Web Editor NEWA library for scanning credit and debit cards
License: MIT License
A library for scanning credit and debit cards
License: MIT License
In iOS after installing latest version pods, Its showing error "No such module 'CardScan'"
latest version is '2.0.3'
previous version '1.0.5032' was not showing the above error
Hi.
Web portal for trial license doesn't work.
Can you check it please?
Thanks.
Hello CardScan team,
I have the SDK up and running and it works well.
I am not sure if this is the right place to ask this, but right now when I scan the credit card, it scans all the relevant data as expected.
However, for my application, I only need the CC number. While I can handle that on the UI side of my app to show only the relevant fields, for a brief moment, on the Card Scanner Controller, it does show that the expiry was scanned as well which might make the user's wonder, why am I scanning this data if I do not need it.
So I was wondering if there was a way to specify what fields we were interested in scanning ?
Thanks in advance.
Most of our users are getting a crash with this error. I can run it fine on my device, and my handful of testers can run the application just fine.
Any help would be appreciated!
I downloaded your iOS demo. all non embosed card not getting scan only some are working. can you please check because for android it is working fine for all card.
As the title says, SimpleScanViewController
misses super call here.
This leads to unexpected behaviour in projects swizzling UIViewController's methods in runtime.
cardholder name always coming out to be empty string
Anyone else receiving this error?
failed downloading 'https://downloads.getbouncer.com/swift_package_manager/2.1.2/CardScan.xcframework.zip' which is required by binary target 'CardScan': downloadError("Error Domain=NSURLErrorDomain Code=-1003 \"A server with the specified hostname could not be found.\" UserInfo={_kCFStreamErrorCodeKey=8, NSUnderlyingError=0x600002c85650 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 \"(null)\" UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, _kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <F0261A9C-03AA-40FD-B2A4-BAB38799C732>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(\n \"LocalDownloadTask <F0261A9C-03AA-40FD-B2A4-BAB38799C732>.<1>\"\n), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://downloads.getbouncer.com/swift_package_manager/2.1.2/CardScan.xcframework.zip, NSErrorFailingURLKey=https://downloads.getbouncer.com/swift_package_manager/2.1.2/CardScan.xcframework.zip, _kCFStreamErrorDomainKey=12}")2023-06-25 09:27:27.677 xcodebuild[70547:21580555] DTDKRemoteDeviceConnection: Failed to start remote service "com.apple.mobile.notification_proxy" on device. Error: Error Domain=com.apple.dtdevicekit Code=811 "Failed to start remote service "com.apple.mobile.notification_proxy" on device." UserInfo={NSUnderlyingError=0x600002c41d40 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653158 "The device is passcode protected." UserInfo={MobileDeviceErrorCode=
I would like to add the cardscan-ios
library to my project using Carthage. I used the example found here
After running carthage update
command in terminal I get error:
A shell task (/usr/bin/xcrun xcodebuild -project /Users/robertmietelski/Desktop/Test/Carthage/Checkouts/cardscan-ios/SpmXCFrameworkTest/SpmXCFrameworkTest.xcodeproj CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES -list) failed with exit code 74:
xcodebuild: error: Could not resolve package dependencies:
Failed to clone repository /Users/kingst/work/cardscan-ios:
fatal: repository '/Users/kingst/work/cardscan-ios' does not exist
Does anyone know how to fix this?
I just updated from an older version (from october) to the previous version 1.0.5029
and I get a new error caused by name conflicts.
In my app I have a custom class called CreditCard
(same as in module CardScan) so I have to distinguish them apart by prefixing CardScan.CreditCard
.
The problem now is I see a new class (introduced in #114) CardScan
.
This breaks my code and I can no longer distinguish my CreditCard
class apart from yours.
Don't name classes/structs/enums
the same name as your module, bad practice.
I have downgraded to 1.0.5027
as for now until this problem gets fixed.
If you could please enable Mac OS Catalyst Compatibility, as the Stripe cocoa pods library has, that would be greatly appreciated. Cheers from Belgium :)
Can you please add "8" and "9" prefixes to CreditCardUtils? In Uzbekistan card numbers starts with "8" and "9"
As read the license there is no limitation to use the sdk in commercial projects, as long as we do not require support or customizations?
Is there support for Swift Package Manager available down the pipeline?
Hello, i have this strange crash with the flag SIGABART(in DEBUG mode) when I try to assign any value to the instance of ScanViewController
(CardScan version 2.0.7).
That only happen in a real device, the iPhone SE(2nd Generation), iOS 14.4 . I already tried with the Simulator and an iPhone 12(iOS 14.4 too) but nothing bad happens. The crash only happens on the iPhone SE.
By the way it works fine and displays correctly if I type the following
func recognizerScanCard() -> ScanViewController?
{
guard let vc = ScanViewController.createViewController(withDelegate: self) else {
return nil
}
// vc.stringDataSource = self
// vc.cornerColor = UIColor(hexString: "002BD9")
// vc.allowSkip = true
return vc
}
@IBAction func buttonScanCardPressed(_ sender: AnimatableButtonCustomized)
{
if let vc = self.recognizerScanCard() {
self.present(vc, animated: true, completion: nil)
}
}
Best regards
Hii,
This library works fine for storyboard projects, but it crashes in SwiftUI. I integrated ScanViewController in swiftUI by using UIViewControllerRepresentable. But when I click on the button to open it the App crashes.
I’m attaching my scanner file.Please review it and let me know if I’m doing something wrong.
After integrating CardScan via Carthage I found myself unable to access the Stripe extension - is this something I can do via Carthage?
Release 1.0.5024 breaks Carthage compatibility.
Carthage error message: Dependency "cardscan-ios" has no shared framework schemes for any of the platforms: iOS
I may have time to look at this myself, just wanted to file an issue asap - for the time being I'm using 1.0.5023.
In ScanBaseViewController.captureOutputWork(sampleBuffer:)
- line 342, there is an iOS version constraint and I cannot figure it why.
And I can't found any calls to iOS 11.2+ API of SSDCreditCardOcr
.
So why there is an iOS 11.2+ Constraint ?
I'm configuring CardScan in an Objective-C project. The documentation says:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ScanViewController configureWithApiKey:@"YOUR_API_KEY_HERE"];
return YES;
}
I want to set the Key but there is no configureWithApiKey
method:
Where the key must be set?
Hi!
Could you add some initialization or method to change the texts in Scan View Controller?
Thanks!
Hello team,
I am facing issue while i am scanning emboss card will not get right expire date
I've been working on implementing this for the last day or so but I've run into a couple issues related to orientation.
When changing from landscape to portrait, the blur background doesn't come with it and ends up at half height to match the landscape view.
The camera always rotates no matter what I've tried, making the view very hard to use on landscape.
Currently I'm loading the scanner as a child view of a modal, but loading it directly products the same (albeit much bigger) problems.
Any suggestions for how to resolve these issues would be fantastic.
I'm trying to install ScanCard in my project written in Objective-C. I installed the pod and when I open my workspace I get this message:
Unsupported Swift Version
The target “CardScan” contains source code developed with Swift 2.x. This version of Xcode does not support building or migrating Swift 2.x targets.Use Xcode 8.x to migrate the code to Swift 3.
I'm using XCode 10.1 and macOS Mojave 10.14.5
When trying to scan a credit card after using the camera, the video preview window appears empty and we get Thread 9: EXC_BAD_ACCESS (code=2, address=0x16db6fff8). The line of code that is failing is VideoFeed.swift, line 104: session.addInput(videoDeviceInput).
I've reproduced the error in CardScan - Example by adding a button that opens a standard UIImagePickerController. If you open the camera using the UIImagePickerController 3+ times and then tap the Scan Card button, the error will happen.
Can I custmor card type?
like this...
123456 000000 999999
hey,
first thanks very much this library awesome
i need any advice to edit some points :
1- Hide flash button or change the icon .
2- change the corner radius for indicator in the corner focus area , and change color of it .
3- this point very important any way to hide the text (numbers & expiry date) after catch the info from card , i mean when catch the card number the number show before dismiss .
4- change the font and change labels properties like (lines number) .
i’m sorry to ask many questions, but i think it’s important, any advice to edit or change it please .
I am trying the demo project but the Name and expiry not picking. Any help?
While I was trying to handle the scan credit card's failure, there is no firing for the error when it happened:
for instance:
@available(iOS 11.0, *)
func blockingOcrModel(rawImage: CGImage) {
let (number, expiry, done, foundNumberInThisScan) = ocr.performWithErrorCorrection(for: rawImage)
if let number = number {
self.showCardNumber(number, expiry: expiry?.display())
if self.includeCardImage && foundNumberInThisScan {
self.scannedCardImage = UIImage(cgImage: rawImage)
}
}
if done {
DispatchQueue.main.sync {
guard let number = number else {
return
}
if self.calledDelegate {
return
}
let notification = UINotificationFeedbackGenerator()
notification.prepare()
notification.notificationOccurred(.success)
//let vibrate = SystemSoundID(kSystemSoundID_Vibrate)
//AudioServicesPlaySystemSound(vibrate)
self.calledDelegate = true
let card = CreditCard(number: number)
card.expiryMonth = expiry.map { String($0.month) }
card.expiryYear = expiry.map { String($0.year) }
card.image = self.scannedCardImage
self.scanDelegate?.userDidScanCard(self, creditCard: card)
}
}
}
Here:
It checks if the number is nill (which means there is an error while scanning) then it returns without call self.scanDelegate?.userDidScanCard
which means didn't fire the error?
Maybe there is something I'm missing, but I would appreciate if you could clarify how can I handle the error when it happened.
I have implemented this code and while running app on iPhone 11 its working properly, scans card number , expiry month and expiry year. But when running app in iPhone 8 while scanning I only get the card number and expiry year & month is getting nil.
Is this issue is device specific?
Hi Team,
Please can you let me know how to get card type in iOS, in android we have network as a field to get the card type.
We are using CardScan in our app, and we are presenting the ScanViewController
modally, embedded in a navigation controller. The navigation controller is hidden by ScanViewController
, which is understandable, but our app has rules around modally presented view controllers whereby we always show an X button to close in the top right. Obviously, you provide a back button (outside of a navigation item) on the left side of the view controller, and it would be great to have the flexibility to choose where this is positioned (left or right), and an image for the button.
It's pretty simple my issue. Just add support to Swift Package Maneger. Best regards.
We have trouble, that card with prefix number 2200 doesn't recognizing. It is Russian payment system, prefix = 220. Can you add it please to CardUtils for recognizing. https://en.wikipedia.org/wiki/Mir_(payment_system)
I adapted CardScan from Carthage to Swift Package Manager, removed the reference to / usr / local / bin / carthage copy-frameworks
that belonged to CardScan
now when uploading the app the next error appears. (see the next image)
If you can, try including CardScan with Swift Package Manager in an app and try uploading the Build to the App Store
I have use this library to scan my cards. But sometimes library can't read expire month and year. How can I fix it?
Both methods of protocol ScanEvents are marked as public
in ScanBaseViewController. Due to this fact, we're not able to override these methods.
Is the possibility to change these methods to open?
@objc open class ScanBaseViewController: UIViewController, AVCaptureVideoDataOutputSampleBufferDelegate, ScanEvents, AfterPermissions {
public func onNumberRecognized(number: String, expiry: Expiry?, cardImage: CGImage, numberBoundingBox: CGRect, expiryBoundingBox: CGRect?) {
// relay this data to our own delegate object
self.scanEventsDelegate?.onNumberRecognized(number: number, expiry: expiry, cardImage: cardImage, numberBoundingBox: numberBoundingBox, expiryBoundingBox: expiryBoundingBox)
}
public func onScanComplete(scanStats: ScanStats) {
// this shouldn't get called
}
...
}
After dismissing the view my custom subclass of ScanBaseViewController
is leaking. Moreover, after dismissing the view before it loads makes CPU usage be still on ~30% on a real device when I dismiss the view. I think removing memory leaks of the ScanBaseViewController
would do the thing
Hello dear developers.Can i use default scanner UI and also change there only description text? Or it's required to use SimpleScanViewController? And also please guide more examples to customization please.Thanks
Can you add prefixes for cards in Uzbekistan 8600 Uzcard, 9860 Humo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.