---
title: "Selecting the right WebView for your SDK"
slug: "selecting-the-right-webview-for-your-sdk"
description: "Choose the right WebView option for Veriff integration in iOS or Android apps, balancing ease of use and JavaScript communication needs."
updated: 2025-06-06T14:07:14Z
published: 2025-06-06T14:07:14Z
---

> ## 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.

# Selecting the right WebView for your SDK

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](/v1/docs/redirection-guide-1) or [InContext SDK](/v1/docs/incontext-sdk-1) approach.

> [!NOTE]
> **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](/v1/docs/embedding-in-android-and-ios-webviews) and [Android WebView](/v1/docs/android) 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 |

A **process where the end-user submits the data** required to get verified.

Also referred to as the "end-user flow".

Page where the **end-user is directed after completing the verification flow**. This page does not contain any verification or decision info.

**Default value** is visible in Veriff Customer Portal > Integration's Settings tab. **Override** in Customer Portal or via POST /sessions request's `verification.callback` field (API override wont change the value in Portal).

Find **current value** in POST /sessions response as `verification.callback`.

Also referred to as **redirect URL**.
