Giter Site home page Giter Site logo

card-io / card.io-ios-source Goto Github PK

View Code? Open in Web Editor NEW
685.0 54.0 369.0 162.97 MB

The open-source code for the card.io-iOS-SDK: provides fast, easy credit card scanning in mobile apps

License: Other

Objective-C 54.82% Objective-C++ 7.64% C++ 26.70% Swift 0.23% Python 0.94% C 9.43% Shell 0.19% Ruby 0.05%

card.io-ios-source's Introduction

card.io logo

Credit card scanning for mobile apps

Yes, that's right: the card.io library for iOS is now open-source!

This repository contains everything needed to build the card.io library for iOS.

What it does not yet contain is much in the way of documentation. 😿 So please feel free to ask any questions by creating github issues -- we'll gradually build our documentation based on the discussions there.

Note that this is actual production code, which has been iterated upon by multiple developers over several years. If you see something that could benefit from being tidied up, rewritten, or otherwise improved, your Pull Requests will be welcome! See CONTRIBUTING.md for details.

Brought to you by
PayPal logo

Using card.io

If you merely wish to incorporate card.io within your iOS app, simply download the latest official release from https://github.com/card-io/card.io-iOS-SDK. That repository includes complete integration instructions and sample code.

If you use CocoaPods, then add this line to your podfile:

pod 'CardIO'

If you use Carthage, then add this line to your Cartfile:

github "card-io/card.io-iOS-source"

You must also have an SSH key setup with GitHub so that the dmz submodule will download properly. See the documentation here for directions.

Dev setup

  • clone this repo, including its dmz submodule: git submodule sync; git submodule update --init --recursive
  • requires Xcode 5+ (toolchain for iOS 7)
  • requires Python 2.6+
  • for building releases, requires pip and fabric

Python

We use Python-based build scripts.

If you are using virtualenv and virtualenvwrapper, create a virtual environment (optional but recommended):

# Create virtual environment for Python
mkvirtualenv cardio

Install required Python dependencies (this command may require sudo rights if installing globally):

# Install required dependencies
pip install -r pip_requirements.txt

Baler

We use baler (included in pip_requirements.txt) to encode assets (strings and images) within our library. Create a .baler_env file in the top project directory, and set the $PATH environment variable to include where you installed baler. Examples:

    # Create a .baler_env, specifying the correct path for an installation using virtualenv
    echo 'export PATH=$PATH:~/.virtualenvs/cardio/bin' > .baler_env
    
    # - OR -

    # Create a .baler_env, specifying the correct path if not using virtualenv
    echo 'export PATH=$PATH:'`dirname \`which bale\`` > .baler_env

card.io-dmz

The card.io-dmz submodule (included here in the dmz directory) includes the core image-processing code.

Normal development

Use Xcode in a normal fashion to build the library. The project's icc target is a demo app which will allow you to exercise the library in various ways.

Unofficial card.io-iOS-SDK release

How to make a Release build of the library for your own use:

  • Run fab build:outdir=~ (or specify some other output directory).

Official card.io-iOS-SDK release

How official releasers officially make an official release of card.io-iOS-SDK

Contributors

card.io was created by Josh Bleecher Snyder.

Subsequent help has come from Brent Fitzgerald, Tom Whipple, Dave Goldman, Roman Punskyy, Mark Rogers, and Martin Rybak.

And from you! Pull requests and new issues are welcome. See CONTRIBUTING.md for details.

card.io-ios-source's People

Contributors

bluk avatar braebot avatar cybertk avatar esetnik avatar josharian avatar jsorge avatar jussisuojanen avatar lkorth avatar martinrybak avatar mgroger2 avatar tomwhipple avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

card.io-ios-source's Issues

libCardIO.a as zip

Suggestion:
I don't think it's a good idea to set libCardIO.a as a zip file. It doesn't work well with submodules. For example, I have a project that uses card.io as a submodule, it worked fine, but on the newest versions the libCardIO.a was changed to a zip file, now I have to decompress it and add on my git library. This adds two big problems:

It gets harder to use git submodule to update the library, since it needs to be manually unzipped every time;
It adds the need to add the library to the main repo. Duplicating the files required to download, besides bloating the repo with unnecessary files that could be handled by the submodule.

I'm not sure if this suggestion makes more sense on this repo or on https://github.com/card-io/card.io-iOS-SDK. Feel free to close it if I should have added this on the other repo.
Thanks.

Finnish language support

I'm using your card-io Cordova plugin and I would like to know how to add Finnish language support. By investigating little I came to conclusion that Cordova plugin is using this underneath. Hope I'm right :) But I could not find any info on how to add new languages.. Or actually I would really appreciate if someone would be nice enough to do it for me. I will gladly provide Finnish language translations against English ones. I'm no iOS programmer, so that's why I'm asking your help to do this.

Card IO : Set Focus Mode for Non-payment cards

[Issue moved here from card.io-iOS-SDK]
[Issue actually created by @biksappdev]

Hi @dgoldman-ebay , I have been trying to get this going with little luck. So I tried calling the autoFocusOnce as below -

  • (void)startVideoStreamSession { [self.videoStream startSession]; [self.videoStream autofocusOnce]; // If we don't do this, then when the torch was on, and the card read failed, // it still shows as on when this view is re-displayed, even though the ending // of the session turned it off. [self updateLightButtonState]; }

Also, // if (!self.currentlyAdjustingFocus && frame.focusSucks && [self hasAutofocus]) {
NSTimeInterval now = [[NSDate date] timeIntervalSince1970];
// if (now - self.lastAutoFocusOnceTime > kMinTimeIntervalForAutoFocusOnce) {
self.lastAutoFocusOnceTime = now;
CardIOLog(@"Auto-triggered focusing");
[self autofocusOnce];
[self performSelector:@selector(resumeContinuousAutofocusing) withObject:nil afterDelay:0.1f];
didAutoFocus = YES;
// }
// }

Removed the condition for triggering autoFocusOnce method while capturing a picture, however I am not able to get a clear shot every time. The library captures an image before it recognizes the corners.
Kindly put me in the right direction to resolve this.
I am looking forward to get the same behavior as it is for payment cards.

4701fd0c-e50f-11e4-8268-5be5b52c9e35

Facing Link issue in my project on Using generated .a files.

Hello Team ,

I am getting Below error , When i use libCardIO.a file in Project , while Building my Project , Please suggest.

[TRACE] :  Ld build/Intermediates/Residential\ Test.build/Debug-iphonesimulator/Residential\ Test.build/Objects-normal/i386/Residential\ Test normal i386
[TRACE] :      cd /Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone
[TRACE] :      export IPHONEOS_DEPLOYMENT_TARGET=7.1
[TRACE] :      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin:/Users/ssharma/.rvm/gems/ruby-2.3.0/bin:/Users/ssharma/.rvm/gems/ruby-2.3.0@global/bin:/Users/ssharma/.rvm/rubies/ruby-2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ssharma/.rvm/bin"
[TRACE] :      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Products/Debug-iphonesimulator -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/lib -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/Classes/APSAnalytics -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/Classes/APSHTTPClient -L/Users/ssharma/Library/Application\ Support/Titanium/modules/iphone/ti.geofence/1.1.4 -L/Users/ssharma/Library/Application\ Support/Titanium/modules/iphone/com.appcelerator.apm/1.1.5 -L/Users/ssharma/Library/Application\ Support/Titanium/modules/iphone/ti.map/2.5.2 -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/modules/iphone/com.likelysoft.cardio/1.0.0 -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/modules/iphone/ti.compression/1.1.1 -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/modules/iphone/com.mirasense.scanditsdk/4.15.0 -F/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Products/Debug-iphonesimulator -F/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/../../modules/iphone/com.mirasense.scanditsdk/4.15.0/platform -F/Library/Application\ Support/Titanium/modules/iphone/com.mirasense.scanditsdk/4.15.0/platform -F/Users/ssharma/Library/Application\ Support/Titanium/modules/iphone/com.mirasense.scanditsdk/4.15.0/platform -filelist /Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Intermediates/Residential\ Test.build/Debug-iphonesimulator/Residential\ Test.build/Objects-normal/i386/Residential\ Test.LinkFileList -mios-simulator-version-min=7.1 -dead_strip -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -ObjC -framework CoreLocation -framework CoreLocation -weak_framework MapKit -weak_framework MapKit -framework CoreVideo -framework CoreMedia -framework CoreGraphics -framework CoreText -framework AVFoundation -framework AudioToolbox -framework UIKit -framework QuartzCore -framework SystemConfiguration -liconv -lz -lc++ -framework ScanditBarcodeScanner -fobjc-arc -framework CoreVideo -framework CoreMedia -framework CoreGraphics -framework CoreText -framework AVFoundation -framework AudioToolbox -framework UIKit -framework QuartzCore -framework SystemConfiguration -liconv -lz -lc++ -framework ScanditBarcodeScanner -fobjc-arc -weak-lti_ios_profiler -weak-lti_ios_debugger -weak-lTiCore -weak_framework Contacts -weak_framework ContactsUI -weak_framework WatchConnectivity -weak_framework CoreSpotlight -fobjc-link-runtime -stdlib=libc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Intermediates/Residential\ Test.build/Debug-iphonesimulator/Residential\ Test.build/Residential\ Test.app.xcent -weak_framework iAd -framework CoreMedia -weak_framework CoreMotion -lAPSAnalytics -weak_framework CoreText -framework EventKit -framework EventKitUI -weak_framework Security -licucore -framework Foundation -weak_framework UIKit -framework CoreGraphics -weak_framework AddressBook -framework AddressBookUI -framework CFNetwork -framework CoreLocation -weak_framework MapKit -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -lsqlite3 -lz -framework AudioToolbox -weak_framework MediaPlayer -framework AVFoundation -lxml2 -framework StoreKit -lAPSHTTPClient -framework ExternalAccessory -ltiverify -lti.geofence -lcom.appcelerator.apm -lti.map -lcom.likelysoft.cardio -lti.compression -lcom.mirasense.scanditsdk -Xlinker -dependency_info -Xlinker /Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Intermediates/Residential\ Test.build/Debug-iphonesimulator/Residential\ Test.build/Objects-normal/i386/Residential\ Test_dependency_info.dat -o /Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Intermediates/Residential\ Test.build/Debug-iphonesimulator/Residential\ Test.build/Objects-normal/i386/Residential\ Test
[TRACE] :  ld: warning: directory not found for option '-F/Library/Application Support/Titanium/modules/iphone/com.mirasense.scanditsdk/4.15.0/platform'
[TRACE] :  ld: warning: directory not found for option '-F/Users/ssharma/Library/Application Support/Titanium/modules/iphone/com.mirasense.scanditsdk/4.15.0/platform'
[TRACE] :  Undefined symbols for architecture i386:
[TRACE] :    "_vImageBoxConvolve_ARGB8888", referenced from:
[TRACE] :        -[UIImage(ImageEffects) applyBlurWithRadius:tintColor:saturationDeltaFactor:maskImage:] in libcom.likelysoft.cardio.a(UIImage+ImageEffects.o)
[TRACE] :    "_vImageMatrixMultiply_ARGB8888", referenced from:
[TRACE] :        -[UIImage(ImageEffects) applyBlurWithRadius:tintColor:saturationDeltaFactor:maskImage:] in libcom.likelysoft.cardio.a(UIImage+ImageEffects.o)
[TRACE] :  
[TRACE] :  Ld build/Intermediates/Residential\ Test.build/Debug-iphonesimulator/Residential\ Test.build/Objects-normal/x86_64/Residential\ Test normal x86_64
[TRACE] :      cd /Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone
[TRACE] :      export IPHONEOS_DEPLOYMENT_TARGET=7.1
[TRACE] :      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin:/Users/ssharma/.rvm/gems/ruby-2.3.0/bin:/Users/ssharma/.rvm/gems/ruby-2.3.0@global/bin:/Users/ssharma/.rvm/rubies/ruby-2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ssharma/.rvm/bin"
[TRACE] :      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Products/Debug-iphonesimulator -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/lib -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/Classes/APSAnalytics -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/Classes/APSHTTPClient -L/Users/ssharma/Library/Application\ Support/Titanium/modules/iphone/ti.geofence/1.1.4 -L/Users/ssharma/Library/Application\ Support/Titanium/modules/iphone/com.appcelerator.apm/1.1.5 -L/Users/ssharma/Library/Application\ Support/Titanium/modules/iphone/ti.map/2.5.2 -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/modules/iphone/com.likelysoft.cardio/1.0.0 -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/modules/iphone/ti.compression/1.1.1 -L/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/modules/iphone/com.mirasense.scanditsdk/4.15.0 -F/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Products/Debug-iphonesimulator -F/Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/../../modules/iphone/com.mirasense.scanditsdk/4.15.0/platform -F/Library/Application\ Support/Titanium/modules/iphone/com.mirasense.scanditsdk/4.15.0/platform -F/Users/ssharma/Library/Application\ Support/Titanium/modules/iphone/com.mirasense.scanditsdk/4.15.0/platform -filelist /Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Intermediates/Residential\ Test.build/Debug-iphonesimulator/Residential\ Test.build/Objects-normal/x86_64/Residential\ Test.LinkFileList -mios-simulator-version-min=7.1 -dead_strip -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -ObjC -framework CoreLocation -framework CoreLocation -weak_framework MapKit -weak_framework MapKit -framework CoreVideo -framework CoreMedia -framework CoreGraphics -framework CoreText -framework AVFoundation -framework AudioToolbox -framework UIKit -framework QuartzCore -framework SystemConfiguration -liconv -lz -lc++ -framework ScanditBarcodeScanner -fobjc-arc -framework CoreVideo -framework CoreMedia -framework CoreGraphics -framework CoreText -framework AVFoundation -framework AudioToolbox -framework UIKit -framework QuartzCore -framework SystemConfiguration -liconv -lz -lc++ -framework ScanditBarcodeScanner -fobjc-arc -weak-lti_ios_profiler -weak-lti_ios_debugger -weak-lTiCore -weak_framework Contacts -weak_framework ContactsUI -weak_framework WatchConnectivity -weak_framework CoreSpotlight -fobjc-link-runtime -stdlib=libc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Intermediates/Residential\ Test.build/Debug-iphonesimulator/Residential\ Test.build/Residential\ Test.app.xcent -weak_framework iAd -framework CoreMedia -weak_framework CoreMotion -lAPSAnalytics -weak_framework CoreText -framework EventKit -framework EventKitUI -weak_framework Security -licucore -framework Foundation -weak_framework UIKit -framework CoreGraphics -weak_framework AddressBook -framework AddressBookUI -framework CFNetwork -framework CoreLocation -weak_framework MapKit -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -lsqlite3 -lz -framework AudioToolbox -weak_framework MediaPlayer -framework AVFoundation -lxml2 -framework StoreKit -lAPSHTTPClient -framework ExternalAccessory -ltiverify -lti.geofence -lcom.appcelerator.apm -lti.map -lcom.likelysoft.cardio -lti.compression -lcom.mirasense.scanditsdk -Xlinker -dependency_info -Xlinker /Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Intermediates/Residential\ Test.build/Debug-iphonesimulator/Residential\ Test.build/Objects-normal/x86_64/Residential\ Test_dependency_info.dat -o /Users/ssharma/Documents/Appcelerator_Studio_Workspace/FieldResidential/build/iphone/build/Intermediates/Residential\ Test.build/Debug-iphonesimulator/Residential\ Test.build/Objects-normal/x86_64/Residential\ Test
[TRACE] :  ld: warning: directory not found for option '-F/Library/Application Support/Titanium/modules/iphone/com.mirasense.scanditsdk/4.15.0/platform'
[TRACE] :  ld: warning: directory not found for option '-F/Users/ssharma/Library/Application Support/Titanium/modules/iphone/com.mirasense.scanditsdk/4.15.0/platform'
[TRACE] :  Undefined symbols for architecture x86_64:
[TRACE] :    "_vImageBoxConvolve_ARGB8888", referenced from:
[TRACE] :        -[UIImage(ImageEffects) applyBlurWithRadius:tintColor:saturationDeltaFactor:maskImage:] in libcom.likelysoft.cardio.a(UIImage+ImageEffects.o)
[TRACE] :    "_vImageMatrixMultiply_ARGB8888", referenced from:
[TRACE] :        -[UIImage(ImageEffects) applyBlurWithRadius:tintColor:saturationDeltaFactor:maskImage:] in libcom.likelysoft.cardio.a(UIImage+ImageEffects.o)
[TRACE] :  ld: symbol(s) not found for architecture x86_64
[TRACE] :  clang: error: linker command failed with exit code 1 (use -v to see invocation)

Please suggest?

CardIOPaymentViewController.m:24:11: fatal error: 'CardIOBundle.h' file not found

Hello,

First off all apologies for posting here in the issues, but i couldn't find anywhere to ask for help (do you guys/girls have a discussion place for card.io?). I have pulled the card.ios-Source, and in my project both these files are missing 'CardIOBundle.h' and 'CardIOBundle.m'.

I noticed that these two files are part of the .gitignore file, which leads me to believe they should be auto-generated. How do I do this? What am I missing?

Many thanks

Accept a broader range of expiry years

1).
I found that the check rule of "expiry" is not correct for most of my cards and no scan result in "expiry" field!! (Most of my cards' maximum year of expiry is "2020")
The check rule in function "expiry_string_to_expiry_month_and_year" ( in expiry_categorize.cpp , dmz) is as below, and it is not correct.

if (full_year < current_year + 5
    && (full_year > current_year || (full_year == current_year && month >= current_month))
        ) {
..................
}

2).
I got some information by Google, and it seems that maximum year of expiry may be between 3~8 (usually 5)

How to Generate New libCardIO.a using Xcode in Release Mode.

Hello Team ,

I am Compiling icc Project using Xcode , Using Scheme CARDIO static library , Project compiles Successfully , but I can not find build folder under project directory which gets generated on successful compilation of Library ,

Please can you suggest how i can generate New .a file using Xcode. What all setup needs to do for same??

Thanks ,
Sachinkumar Sharma

Get high resolution of card image

There is access to a rectified card image; usually 428x270. Might there be a way to get a high resolution of the card image? (not limited to 428x270)

It would be great to have ability to get at full camera resolution, the OCR libraries could still be run on a smaller scaled down version (640x480?).

How can i integrate card.io without scan card feature(only manual entry) with custom UI

First of all thanks for the wonderful library.
In one of my app i want to use card.io's mechanism to validate the card , but i do not want scanning feature I only want manual entry feature.

And also i have my custom UI built in for getting card's number and expiry.

Can i apply your your method to validate those info along with displaying card's image on the textfiled alon with the formatter (i.e. 4111 1111 1111 111) ?

Thanks

Standing/portrait layout cards

What is the status of support in card.io for printed (non-embossed) cards that has the info laid out in a vertically oriented fashion? They've been around for a while and seem to be becoming increasingly commonplace.

Example:
Standing MasterCard

Additional example + ref

Changing the models

@dgoldman-ebay @josharian
Regarding issue #50, I was wondering if the Python library and scripts needed to generate/modify models were ever going to documented and released in the future. Given that more cards with non-embossed digits and various digit patterns are cropping up, it would great if developers were allowed to make the models more inclusive of those changes.

How do I pass my own acquired CMSampleBufferRef objects?

I have my own capture pipeline and would like to pass CMSampleBufferRef from my pipeline into yours - probably into CardIOVideoFrame. I have my own UI, so all I need is the credit card/expiry data available to me if found. I've attempted to use the SDK approach but added CardIOVideoFrame.h to get direct access, but that doesn't work. Great library thanks!

Nullability annotations for public headers

Ideally, all ObjC libraries using from Swift should have "nullability annotations" in their headers. These annotations describe the expected behavior of Objective-C pointers with respect to whether they would ever be nil in normal use. This lets the Swift importer figure out whether to import the symbol as an optional or not.
For headers that haven't been annotated, the importer always pulls it in as an implicitly-unwrapped optional (pretty much the worst option).

So, it would be good to add nullability annotations for public headers for proper using CardIO both in Obj-C and Swift codebases.

Change of UI and flow

Just some quick question

  1. Is it possible to change the design and text on the scanner camera screen?
  2. Can we change the flow, we just want to verify a creditcard it that possible?

CardDetectionMode

If I set the card detection mode to image only, is there an internal function that would allow me to perform OCR on the image or would I have to use another API like tesseract? I'm using a Manulife Bank card so the number can't be recognized.

Getting error when running fab build:outdir=~

First of all thanks for this wonderful library!
I did some changes in the source code so I tried to build the code by following the steps you mentioned in the Github page. After installing python and fabric I just i ran the fab build:outdir=~ comment. It started to build but suddenly it aborted. Can you please guide me what is the mistake I did here? and also it would be really good if you provide some detailed steps for unofficial card.io-iOS-SDK release. It may help us people like me those who has only objective-c knowledge.

Below is the output i got when ran fab build:outdir=~ comment

thavasi-2473:card.io-iOS-source thavasi-2473$ fab build:outdir=~
Setup
All .strings files appear to be correct.
Will save release sdk to /Users/thavasi-2473
[localhost] local: git describe --match='iOS
[0-9]_.[0-9]*' --tags --always --dirty
Preparing dmz
Building
Using temp dir /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/
Using extra Xcode flags:
(Release) Building armv7
(Release) Building armv7s
(Release) Building arm64
(Release) Building i386
(Release) Building x86_64
(Release) Lipoing

Fatal error: local() encountered an error (return code 127) while executing 'xcode-select -print-path/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/armv7/libCardIO.a -arch armv7s /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/armv7s/libCardIO.a -arch arm64 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/arm64/libCardIO.a -arch i386 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/i386/libCardIO.a -arch x86_64 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/x86_64/libCardIO.a -create -output /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/universal/libCardIO.a'

Aborting.
local() encountered an error (return code 127) while executing 'xcode-select -print-path/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/armv7/libCardIO.a -arch armv7s /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/armv7s/libCardIO.a -arch arm64 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/arm64/libCardIO.a -arch i386 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/i386/libCardIO.a -arch x86_64 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/x86_64/libCardIO.a -create -output /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/universal/libCardIO.a'
thavasi-2473:card.io-iOS-source thavasi-2473$

git submodule update --init --recursive

Submodule 'dmz' ([email protected]:card-io/card.io-dmz.git) registered for path 'dmz'
Cloning into 'dmz'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Clone of '[email protected]:card-io/card.io-dmz.git' into submodule path 'dmz' failed
localhost:card.io-iOS-source kuailefu$

Card.IO locks the focus

Card.IO locks the focus and does not unlock it after use. This throws up issues when using other libraries - i am using Jumio Netverify to OCR identity documents. After using Card.IO in the same cordova app, Jumio SDK is unable to focus properly.

Could you please pinpoint where the issue is and how we reset the focus and other setting to default values?

I am happy to fix and create a pull request ..

Many thanks,
Junaid

Adjusting focus for iPhone 6 / 6 Plus

Hi there.

I've noticed that Card.IO has a tendency to take a photo too quickly on the iPhone 6 & 6 Plus. Not sure if this is due to the camera quality or the SDK detecting edges that don't belong to the card, but it's leading to photos that are unfocused.

I had a look at CardIOGuideLayer.mm, and wondered if upping the float values being used in the 'setVideoFrame:videoFrame' method (line 469) would help make the SDK wait before the user has their card fully focused in the frame. Anywhere else I should considering looking?

Thanks in advance.

proposal: way to reduce visual glitches of buttons on screen rotation

in CardIOViewController.mm, block of lines between 318 and 334 which normalizes buttons sizes, could be framed with

    [CATransaction begin];
    [CATransaction setDisableActions:YES];
//...
    [CATransaction commit];

code to reduce visual glitches of buttons on screen rotation. it works for deltas InterfaceToDeviceOrientationRotatedClockwise and InterfaceToDeviceOrientationRotatedCounterclockwise. for deltas InterfaceToDeviceOrientationSame and InterfaceToDeviceOrientationUpsideDown it's better to omit mentioned framing.

card.io-lite

Quick question -- any chance you'd be up for creating a lite version of card.io? 😄

We're happily using card.io in our app, but with the latest card.io, it accounts for 40% of the size of our app download (2.5 of 6.3MB). Small app size is key for our product, since it's most often downloaded when time is really tight.

How tough would it be to strip out the "enter manually" view and remove the AudioToolbox framework? Are there any other crafty revisions you can think of, that might shrink card.io's footprint a bit further?

Thanks so much!

can't release

when I run fab build:outdir=~
Setup
All .strings files appear to be correct.
Will save release sdk to /Users/lc
[localhost] local: git describe --match='iOS
[0-9]_.[0-9]*' --tags --always --dirty

Fatal error: local() encountered an error (return code 128) while executing 'git describe --match='iOS_[0-9].[0-9]' --tags --always --dirty'

Aborting.

how can I do?

resolution is low, let user specify the sessionPreset?

#define kCaptureSessionDefaultPresetResolution AVCaptureSessionPreset640x480

// If we ever want to use higher resolution images, this is a good place to do that.
// if ([self.captureSession canSetSessionPreset:AVCaptureSessionPreset1920x1080]) {
// self.captureSession.sessionPreset = AVCaptureSessionPreset1920x1080;
// }
// else
// if ([self.captureSession canSetSessionPreset:AVCaptureSessionPreset1280x720]) {
// self.captureSession.sessionPreset = AVCaptureSessionPreset1280x720;
// }
// }

[self.captureSession addInput:self.cameraInput];
self.captureSession.sessionPreset = kCaptureSessionDefaultPresetResolution;

Should I turn these parts of code into a public interface?

Xamarin Support

I'd like to start some discussion around Xamarin support for Card.IO (iOS and Android). Moving it to this new issue as per card-io/card.io-iOS-SDK#205

We (Xamarin) already have a set of what we call 'bindings' to the native iOS and Android SDK's for Card.IO that we have been maintaining for some time now. You can find the open source binding code here: https://github.com/xamarin/XamarinComponents/tree/master/XPlat/CardIO

The Xamarin platform is exploding in popularity, and we would love to engage Card.IO and see if it makes sense for you to own these bindings going forward.

Edge detection struggles on non-credit cards objects when preset resolution is higher than 640x480

I am attempting to repurpose card.io to be able to perform some basic edge and corner detection on paper documents. By setting detectionMode to CardIODetectionModeCardImageOnly, I'm able to successfully capture the edges and corners of paper documents by yoking the UIImage out from the CardIOCreditCardInfo object.

That being said, the output quality is low, and I gather from @dgoldman-ebay's comment #16 (comment) that this is expected. I upped the resolution to AVCaptureSessionPreset1920x1080 and it fails to detect the borders and edges of paper documents in the green enclosure.

Is this due to the nature of the edge detection pipeline? How feasible is it to implement scanning paper documents at high preset resolutions without losing its border/edge detection prowess that's available at lower preset resolutions?

Generating model file for a different number pattern

I need to scan an ATM card that has a different pattern.

I've made some quick changes to the source code, and replaced the Visa pattern found in n_vseg.cpp. Luckily, it's perfectly scanning the ATM:
atm_card

The thing is that I also need to scan Visa cards. After trying to understand the code, I think that I need to modify modelm_befe75da.cpp in order to include the new pattern. I would like to replace the Amex pattern with the ATM one, but I have no idea of how to modify/generate this file.

Is there a guide that explains how to generate this model file?

extend blurredScreenImageView or add a new ios control centre like blur to the utilities

Hi Dave,

Posting the request as git hub issue as discussed.
In the project I am working on I need to produce a full screen ios blur effect of the CardIOCameraView.
I looked into the Card IO utility blurredScreenImageView and trying to follow gaussian blur effect to produce similar. But I see that its based out shaders. I have less knowledge on shaders so would be glad if you could kindly guide me create an optimized ios blur effect.

Thanks in advance

'warp.h' file not found

Few files are missing in sources project and few are colored red because they are not present in project.like files in Scan>dmz group

how to solve this problem?

ln: .git/hooks/pre-commit: No such file or directory

Hi,
I am trying to run the sample xcode project provided and facing this issue "ln: .git/hooks/pre-commit: No such file or directory".

From this link - cyassl/cyassl#26, it seems like this issue arises due to 'a git download without .git directory structure'.

Requesting you to please help me resolve this issue.

Compiler errors on Xcode 8

card.io is failing to compile on Xcode 8 on line https://github.com/card-io/card.io-iOS-source/blob/master/Classes/CardIOVideoStream.mm#L267

The problem is that the the cardIOPaymentViewControllerForResponder: method is defined as + (CardIOPaymentViewController *)cardIOPaymentViewControllerForResponder:(UIResponder *)responder. So it is expecting a UIResponder * as the parameter.

https://github.com/card-io/card.io-iOS-source/blob/master/Classes/CardIOVideoStream.mm#L267 is calling CardIOPaymentViewController *vc = [CardIOPaymentViewController cardIOPaymentViewControllerForResponder:self.delegate]; and self.delegate is defined as @property(nonatomic, weak, readwrite) id<CardIOVideoStreamDelegate> delegate; so it is not guaranteed to be a UIResponder *.

I honestly have no idea how this currently compiles on Xcode 7 but apparently the compiler has been updated for Xcode 8 and is now catching this.

I think you can just update CardIOVideoStream.h to be @property(nonatomic, weak, readwrite) UIResponder<CardIOVideoStreamDelegate> *delegate; and then this compiler error will go away. It looks like the CardIOCameraView is the only thing that uses CardIOVideoStream and it is a subclass of UIView which is a UIResponder.

Carthage compatibility.

Carthage support not working on xcode 8 beta 3. Please fix it. The log is here:

*** Fetching card.io-iOS-source
*** Checking out card.io-iOS-source at "iOS_5.3.2"
A shell task (/usr/bin/env git clone --quiet [email protected]:card-io/card.io-dmz.git%

How to open scan camera screen using Paypal SDK

Hello,
I have used card io lib, that works fine. Now I need to use Paypal in my app.
SO I have to remove card io lib.
Is there any method to open camera screen to scan, like card io does, Using Paypal?

Be more lenient in allowing Expiry and CVV to both appear in a single row

The current calculation assumes that each field will contain both a label and a response. But these days the label is empty, as we use placeholder text instead.

So the labelFitsInMultiField: method should be made smarter, to consider with the total width of the label and placeholder, and in our current cases not leave additional room for the response.

Hi

is it possible to use your lib without any validations? just use it as a card reader scan or manually entry without validations...
you made it very hard use your open source files :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.