Usage - Hybrid Apps
Configure Visa Checkout SDK
Make sure to
import VisaCheckoutSDK
in all files that use it.Add the following lines to the
viewDidLoad
method of yourUIViewController
:
Swift:
VisaCheckoutPlugin.configure(webView.configuration.userContentController,
viewController: self)
Objective-C:
[VisaCheckoutPlugin configure:self.webView.configuration.userContentController
viewController:self];
You may call the above method multiple times but only need to call it once normally.
Results
After completing these steps, your Xcode project looks similar to one of the following:
Enable Face ID
In iOS 11, applications that use Face ID are required to have an entry for the NSFaceIDUsageDescription (Privacy - Face ID Usage Description
) key in their Info.plist file. This String
lets you describe the reason your app uses Face ID and is displayed to users upon a Face ID authentication prompt. It is highly recommended to include this key in your app’s Info.plist since a main feature of the Visa Checkout Plugin is easier authentication. This key is required in the main bundle’s Info.plist and could have a value of any String
. The simplest solution is using an empty string “”, since the subtext isn’t really necessary and then you don’t have to worry about localizing the String
.