Nuvei Cashier Card Scanner SDK for iOS
LICENSE
See license
SETUP
CocoaPods
If you useAdd the next line to the dependencies list in your Podfile:
pod 'NuveiCashierCardScanner'
Add the next block in the end of your app's target dependencies:
pre_install do |installer|
# workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
Next is a sample Podfile with all the additions above:
platform :ios, '10.0'
use_frameworks!
install! 'cocoapods', :deterministic_uuids => false
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/SafeChargeInternational/Pods.git'
target 'NuveiCashierCardScannerExample' do
pod 'NuveiCashierCardScanner', '~> 1.0'
pre_install do |installer|
# workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
end
USAGE
Import the SDK module:
import NuveiCashierCardScanner
The SDK works with WKWebView, so add the next line before you load Nuvei cashier page in the web view:
NuveiCashierCardScanner.connect(to: webView)
ACKNOWLEDGEMENTS
This SDK depends on card-io, so please follow the next requirements by card-io:
- Add card.io's open source license acknowledgments to your app's acknowledgments.
- Refer to the header files for more usage options and information.
- You should add the key NSCameraUsageDescription to your app's Info.plist and 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.
HINTS & TIPS
- Processing images can be memory intensive, so make sure to test that your app properly handles memory warnings.
- For your users' security, obscure your app's cached screenshots while the payment web view is displayed.