Welcome to the documentation page for ppbLinkID, a library that provides a simple and convenient way to integrate BlinkID SDK into your iOS application. This library allows you to easily scan various types of identification documents such as ID cards, passports, and driver’s licenses.
Getting Started
Before you start integrating ppbLinkID into your iOS project, make sure you have the following prerequisites:
- Xcode IDE installed on your machine
- An active Apple Developer account
Follow these steps to integrate ppbLinkID into your iOS application:
- Download the latest version of ppbLinkID from the BlinkID GitHub repository.
- Unzip the downloaded file and navigate to the “BlinkID_XYZ” directory.
- Open your Xcode project.
- In the Finder, drag and drop the “BlinkID_XYZ” directory into your Xcode project.
- In the dialog that appears, make sure to select “Copy items if needed” and check the target to which you want to add BlinkID.
- In your Xcode project’s target settings, navigate to the “Info” tab and under “URL Types” section, add a new URL scheme. The URL scheme is in the format “blinkidXYZ” and it corresponds to “XYZ” part in the “BlinkID_XYZ” folder name.
- In your app’s Info.plist file, add the following key-value pair:
- Key: Privacy – Camera Usage Description
- Value: $(PRODUCT_NAME) needs camera access to scan identification documents.
- Build and run your project. ppbLinkID is now integrated into your iOS application!
Usage
Using ppbLinkID is straightforward. Simply follow the steps below to get started:
- Import the ppbLinkID module in your Swift file:
import ppbLinkID
- Create an instance of BlinkIDCombinedRecognizer:
let blinkIDCombinedRecognizer = BlinkIDCombinedRecognizer()
- Implement the BlinkIDViewControllerDelegate protocol in your view controller:
class MyViewController: UIViewController, BlinkIDViewControllerDelegate {
// Your code here
}
- Show the BlinkIDScanViewController to allow users to scan their identification documents:
func showBlinkIDScanView() {
let blinkIDScanViewController = BlinkIDScanViewController(recognizer: blinkIDCombinedRecognizer, delegate: self)
present(blinkIDScanViewController, animated: true, completion: nil)
}
- Handle the scan results in the delegate method:
func blinkIDViewControllerDidFinishScanning(_ blinkIDViewController: BlinkIDScanViewController,
state: MBScanViewResult) {
if let result = state.result {
// Handle scan results here
print(result)
}
}
Congratulations! You have successfully integrated ppbLinkID into your iOS application.
Additional Resources
For more details on how to customize the scanning process and manage scan results, please refer to the official BlinkID SDK documentation.