If you made it until here, you've successfully installed the Preventor SDK for iOS. Now let's adjust your last settings and start your first verification.
Please add the following permissions to your app's Info.plist, so that the Preventor iOS SDK can access a user's camera to run a verification. You can do this in the property list view or by code.
Right-click somewhere outside the table and select Add Row. Now add the entries like below.
Or if you prefer to do this step with code, right-click on Info.plist and select Open As -> Source Code. Add the lines below somewhere inside the <dict> </dict>
<!-- permission strings to be include in info.plist --><key>NSCameraUsageDescription</key><string>Please give us access to your camera, to complete the verification.</string><key>NSLocationWhenInUseUsageDescription</key><string>Please give us access to your location to complete the verification.</string><key>NSLocationWhenInUseUsageDescription</key><string>Please give us access to your location to complete the verification.</string><key>NSPhotoLibraryUsageDescription</key><string>Please give us access to your photo library to verify you.</string><key>NFCReaderUsageDescription</key><string>Give us NFC access to complete verification.</string><key>com.apple.developer.nfc.readersession.formats</key><array> <string>TAG</string></array><key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key><array> <string>A0000002471001</string> <string>E80704007F00070302</string> <string>A000000167455349474E</string> <string>A0000002480100</string> <string>A0000002480200</string> <string>A0000002480300</string> <string>A00000045645444C2D3031</string></array>
You have successfully finished setting up the Preventor iOS SDK! 🎉
Customization
If you want to add your own customization you can use the following methods
Method
Description
setNavigationTitle
Use this method to change the navigation title of the SDK.
4. Handling Verifications
To find out if a user started, completed, canceled or failed the verification process, you can implement the following delegate methods:
Method
Description
onStart
This callback method is triggered once a user starts the verification flow.
onSubmitted
Method that is being called once verification data is submitted to Preventor.
onFinish
Method that is being called once a user clicks the "Finish" button.
onError
This callback method fires when a user canceled the verification flow, the verification ended with an error, or the user performed an incorrect process. You can use this to find out the reason for the error.
Error codes:
CANCELLED_BY_USER
BIOMETRIC_AUTHENTICATION_FAILED
BAD_STEP_BY_USER MISSING_PARAMETERS
onNextStep
This callback method is called when the SDK is ready to move on to the next check.