--- title: "iOS WebView implementation guide | Veriff.com" slug: "ios-webview-guide" description: "Learn how to implement verification flow into iOS application using WebViews." status: "update" updated: 2026-01-08T14:42:53Z published: 2026-01-08T14:42:53Z canonical: "devdocs.veriff.com/ios-webview-guide" --- > ## Documentation Index > Fetch the complete documentation index at: https://devdocs.veriff.com/llms.txt > Use this file to discover all available pages before exploring further. # iOS WebView implementation guide This guide explains how to bring Veriff’s verification flow into your iOS application using WebViews. Veriff supports two WebView implementations, each with different use cases and requirements. ## WebView options ### SFSafariViewController - Provides a full-screen native browser experience - Compatible only with the Redirect approach - Requires JavaScript binding for InContext SDK ### WKWebView (recommended) - Embeds web content directly within your native app - Offers greater JavaScript control and customization - Recommended for most use cases --- ## Required OS Permissions Add these permissions to your `Info.plist` before integrating the verification flow: | Key | Description | | --- | --- | | Privacy - Camera Usage Description | This app uses the camera to capture photos and videos | | Privacy - Microphone Usage Description | This app uses the microphone to record videos with audio | **Note**: If you do not need audio in the video recordings, you can request audio to be disabled for your integration. --- ## WKWebView configuration The following settings are essential for proper WebView functionality in Veriff’s verification flow: ### Key WebView settings ```swift // SETTING: Allow inline video/camera playback // WHAT IT DOES: Enables videos to play within the WebView rather than fullscreen // DOCS: https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1614793-allowsinlinemediaplayback webViewConfig.allowsInlineMediaPlayback = true // SETTING: Disable user interaction requirement for media playback // WHAT IT DOES: Critical for allowing camera access without user tap/interaction // DOCS: https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1851524-mediatypesrequiringuseractionfor webViewConfig.mediaTypesRequiringUserActionForPlayback = [] // SETTING: Enable HTTPS upgrades (iOS 15+) // WHAT IT DOES: Automatically upgrades HTTP connections to HTTPS when possible // DOCS: https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/3752243-upgradeknownhoststohttps if #available(iOS 15.0, *) {    webViewConfig.upgradeKnownHostsToHTTPS = true } // SETTING: Enable JavaScript (iOS 15+) // WHAT IT DOES: Ensures JavaScript is enabled, which is required for the web application // DOCS: https://developer.apple.com/documentation/webkit/wkwebpagepreferences/allowscontentjavascript/ if #available(iOS 15.0, *) {    let preferences = WKWebpagePreferences()    preferences.allowsContentJavaScript = true    webViewConfig.defaultWebpagePreferences = preferences } // SETTING: Configure content inset adjustment behavior // WHAT IT DOES: Prevents automatic content insets that could affect layout // DOCS: https://developer.apple.com/documentation/uikit/uiscrollview/contentinsetadjustmentbehavior-swift.property webView.scrollView.contentInsetAdjustmentBehavior = .never // SETTING: Set delegate for handling navigation events // WHAT IT DOES: Required for intercepting URL changes and handling redirects // DOCS: https://developer.apple.com/documentation/webkit/wknavigationdelegate webView.navigationDelegate = yourNavigationDelegate ``` ### Camera permission handler (iOS 15+) Implement this delegate method to handle camera permissions before Veriff’s verification flow starts: ```swift // DELEGATE METHOD: Handle camera permission requests // WHAT IT DOES: Allows auto-approval of camera permissions for trusted domains // DOCS: https://developer.apple.com/documentation/webkit/wkuidelegate/3763087-webview @available(iOS 15.0, *) func webView(_ webView: WKWebView,            requestMediaCapturePermissionFor origin: WKSecurityOrigin,            initiatedByFrame frame: WKFrameInfo,            type: WKMediaCaptureType,            decisionHandler: @escaping (WKPermissionDecision) -> Void) {    // Auto-approve camera access for trusted domains    if origin.host.contains("VERIFF END USER FLOW DOMAINS") {        decisionHandler(.grant)    } else {        // For all other domains, show the permission prompt        decisionHandler(.prompt)    } } ``` --- ## Safe Areas For safe area handling, we only support `WKWebView` on iOS. To make this work, ensure the following is met: - `wkWebView.scrollView.contentInsetAdjustmentBehavior = .never` is set - ` .ignoresSafeArea(.all)` is set - You have contacted your Solutions Engineer who has enabled the feature internally for the integration (`use_ios_safe_area_padding_web` feature flag to `true`) --- ## Changelog | Date | Description | | --- | --- | | Jan 8, 2026 | Guidelines in [Safe Areas](/v1/docs/ios-webview-guide#safe-areas) section updated | | Jun 6, 2025 | Heading “Article versioning” changed to “Changelog” | | May 15, 2025 | Documentation published | A **process where the end-user submits the data** required to get verified. Also referred to as the "end-user flow".