Credit card scanning

iOS

Android

Credit card number and expiration date can be scanned with your phone camera, saving you from having to key in your digits manually.

Tap the camera icon in the card number field to scan the card.

For the first time the app will request access to the camera.

Then position your card and it will scan card number and expiration date.

You will still need to manually enter card holder and CVV code.

Integration

To enable this feature add the following framework to the project.

OPPWAMobile-CardIO.framework

Drap and drop OPPWAMobile-CardIO.framework to the "Frameworks" folder of your project.Make sure "Copy items if needed" is checked.

Embed the framework

Go to the app target’s General configuration page.

Add the framework target to the Embedded Binaries section by clicking the Add icon.

Select OPPWAMobile-CardIO.framework from the list of binaries.

Add a Run Script

The framework contains a build for both the simulator (i386, x86_64) and the actual devices (ARM). As it is not permitted to submit a binary for an unsupported architecture to App Store, you have to add script that "manually" removes unused architectures from the final binary.

Go to the app target’s Build Phases tab.

In Xcode menu, select Editor > Add Build Phase > Add Run Script Build Phase. You should now see a Run Script section in your Build Phase options.
Important: "Run Script" phase should be put after "Embed Framework" phase. You can reoder build phases by dragging them using your mouse.

Set it to use /bin/sh and check the Run script only when installing option.

NSCameraUsageDescription - set the value to be a string describing why your app needs to use the camera (e.g. "To scan credit cards."). This string will be displayed when the app initially requests permission to access the camera.