Monday, April 25, 2016

Playing around with card.io SDK




This is a simple SDK that can read card information. Below is how we can instantiate and bring up this controller. 

We need to call [CardIOUtilities preload]; From the documentation, The best time to call preload is when displaying a view from which card.io might be launched. 
The preload method prepares card.io to launch faster. Calling preload is optional but suggested. On an iPhone 5S, for example, preloading makes card.io launch ~400ms faster.
preload works in the background; the call to preload returns immediately.

CardIOPaymentViewController *scanViewController = [[CardIOPaymentViewController alloc] initWithPaymentDelegate:self];
scanViewController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:scanViewController animated:YES completion:nil];

By default, this brings up the camera screen with the card.io / paypal logo shown up. This logo can be avoided by scanViewController.hideCardIOLogo = true; 

references:

No comments:

Post a Comment