Selecting the right WebView for your SDK

Prev Next

This guide helps you choose the most appropriate WebView option for implementing Veriff’s verification flow into your iOS or Android application, based on whether you use the Redirect or InContext SDK approach.

Cross-Platform Support Note

While we officially document and confirm support for multiple flavors of iOS and Android WebViews, our verification flow can be rendered in many other native-like wrappers across different platforms, provided the equivalent platform-specific settings and permissions are properly configured and mapped to the native system. If you are using another platform, ensure you apply the equivalent settings for camera permissions, JavaScript enablement, and media playback requirements described in the iOS WebView and Android WebView guides.


Understanding the two approaches

Before choosing a WebView option, it is important to understand Veriff’s two approaches for Web/WebView based apps:

  1. Redirect flow:

    • Works with any WebView or browser component

    • No JavaScript bridge required

    • The end-user is directed from your app to our verification flow, they complete the flow, and is then redirected to a callback URL

  2. InContext SDK flow:

    • Requires full WebView (WKWebView on iOS, WebView on Android)

    • Requires JavaScript bridge for initialization and postMessage communication

    • Can be integrated into any web app, regardless of UI framework, since it is an iframe that wraps Veriff’s web flow


WebView options by SDK integration type

SDK integration type

Recommended WebView Approach

Why?

Redirect Flow

  • iOS: SFSafariViewController (WKWebView works, but more setup is needed)

  • Android: Chrome Custom Tabs

  • No JavaScript/HTML bridge necessary

InContext SDK

  • iOS: WKWebView

  • Android: WebView

  • Requires JavaScript to initialize

  • The InContext SDK communicates user flow statuses via the postMessage API, plus other session life cycle events


Key decision factor: JavaScript communication

The primary factor in your decision should be whether you need JavaScript communication between your native app and Veriff’s verification flow.

Redirect flow (no JavaScript bridge required)

With the Redirect approach:

  • The verification process starts with a redirect  to Veriff’s end-user flow and completes with a redirect to your callback URL

  • You capture this redirect in your WebView to determine completion

  • No JavaScript bridge or postMessage communication is needed

  • Can be implemented in any WebView

InContext SDK flow (JavaScript bridge required)

With the InContext SDK approach:

  • The verification process communicates via postMessage events

  • Your app must set up a JavaScript/HTML bridge to initialize the SDK and subsequently receive  flow events

  • This requires a WebView with JavaScript interface capabilities

  • Only possible with WKWebView (iOS) or WebView (Android)


Recommendations by use case

Use case 1: quick integration with minimal effort

Best option: Redirect flow with SFSafariViewController (iOS) or Chrome Custom Tabs (Android)

Why:

  • Simplest implementation

  • No JavaScript bridge to maintain

  • Users trust the familiar browser interface

Use case 2: need for event-based communication

Best option: InContext SDK with WKWebView (iOS) or WebView (Android)

Why:

  • Required for postMessage communication

  • Enables real-time event handling

  • Allows for more interactive integrations

  • Necessary when you need to know about events during the verification process


Changelog

Date

Description

Jun 6, 2025

Heading “Article versioning” changed to “Changelog”

May 15, 2025

Documentation published