A sample iOS navtive app integration with Onfido’s Web SDK, using WKWebView component.
This app is a simple demonstration of the minimum configurations that are required to integrate with onfido-sdk-ui using a iOS native WKWebView component.
You can find more detailed documentation here:
You will need to enable Camera, Mic, Photo Library and Location Access in your Info.plist
file:
<key>NSCameraUsageDescription</key>
<string>Camera Access</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location Access</string>
<key>NSMicrophoneUsageDescription</key>
<string>Mic Access</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo Library Access</string>
To load the WebView, we require an API_KEY
and a WORKFLOW_ID
defined within a Env.xcconfig
file.
This can file can be located anywhere, but for simplicity we recommend adding it within SmartCaptureDemo/EnvironmentVariables
.
The file should have the following format:
// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974
API_KEY = <YOUR_API_KEY_HERE>
WORKFLOW_ID = <YOUR_WORKFLOW_ID_HERE>
Important note regarding the environment variable set up The Environment variables are used for internal/demo purposes only. The method used here is appropriate for certain requirements, but it is not encouraged for secrets. Please see here for more details, specifically, the end regarding secrets: https://nshipster.com/xcconfig