Skip to main content
@capgo/capacitor-webview-version-checker Auth & Security Open source

WebView Version Checker Capacitor plugin

Capacitor plugin for checking Android WebView version freshness and guiding users to native update flows

Install

bun add @capgo/capacitor-webview-version-checker bunx cap sync
npm, pnpm or yarn
  • npm install @capgo/capacitor-webview-version-checker
  • pnpm add @capgo/capacitor-webview-version-checker
  • yarn add @capgo/capacitor-webview-version-checker

Guide

How to use WebView Version Checker in Capacitor

Using @capgo/capacitor-webview-version-checker

Public API for checking WebView freshness and guiding users to updates.

Install

bun add @capgo/capacitor-webview-version-checker
bunx cap sync

bunx cap sync copies the plugin's native code into your native projects. Run it again after every plugin upgrade.

Import

import { WebviewVersionChecker } from '@capgo/capacitor-webview-version-checker';

API at a glance

Method Description
check Runs a version check and returns the latest known status.
startMonitoring Enables background monitoring (typically on app resume).
stopMonitoring Disables monitoring.
getLastStatus Returns the last resolved status, or null if no check was run yet.
showUpdatePrompt Shows a native prompt asking the user to update the WebView.
openUpdatePage Opens the configured update page directly.

Examples

check()

Runs a version check and returns the latest known status.

import { WebviewVersionChecker } from '@capgo/capacitor-webview-version-checker';

const result = await WebviewVersionChecker.check();
console.log(result);

startMonitoring()

Enables background monitoring (typically on app resume).

import { WebviewVersionChecker } from '@capgo/capacitor-webview-version-checker';

const result = await WebviewVersionChecker.startMonitoring();
console.log(result);

stopMonitoring()

Disables monitoring.

import { WebviewVersionChecker } from '@capgo/capacitor-webview-version-checker';

const result = await WebviewVersionChecker.stopMonitoring();
console.log(result);

getLastStatus()

Returns the last resolved status, or null if no check was run yet.

import { WebviewVersionChecker } from '@capgo/capacitor-webview-version-checker';

const result = await WebviewVersionChecker.getLastStatus();
console.log(result);

showUpdatePrompt()

Shows a native prompt asking the user to update the WebView.

import { WebviewVersionChecker } from '@capgo/capacitor-webview-version-checker';

const result = await WebviewVersionChecker.showUpdatePrompt();
console.log(result);

openUpdatePage()

Opens the configured update page directly.

import { WebviewVersionChecker } from '@capgo/capacitor-webview-version-checker';

const result = await WebviewVersionChecker.openUpdatePage();
console.log(result);

Listen to events

addListener returns a handle. Call handle.remove() when the screen unmounts.

Full reference

Keep going from Using @capgo/capacitor-webview-version-checker

If you are using Using @capgo/capacitor-webview-version-checker to plan native media and interface behavior, connect it with @capgo/capacitor-webview-version-checker for the implementation detail in @capgo/capacitor-webview-version-checker, Getting Started for the implementation detail in Getting Started, Using @capgo/capacitor-live-activities for the native capability in Using @capgo/capacitor-live-activities, @capgo/capacitor-live-activities for the implementation detail in @capgo/capacitor-live-activities, and Using @capgo/capacitor-video-player for the native capability in Using @capgo/capacitor-video-player.

FAQ

WebView Version Checker plugin FAQ

How do I install the WebView Version Checker plugin in a Capacitor app?

Run "bun add @capgo/capacitor-webview-version-checker" (or "npm install @capgo/capacitor-webview-version-checker"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@capgo/capacitor-webview-version-checker" in your app code.

Does @capgo/capacitor-webview-version-checker work with React, Vue and Angular?

Yes. WebView Version Checker is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Which Capacitor version does @capgo/capacitor-webview-version-checker support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Is @capgo/capacitor-webview-version-checker free and open source?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-webview-version-checker/ and the package is free to install from npm. Bug reports and pull requests are welcome.

Can I update code that uses WebView Version Checker without an App Store review?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

Ship WebView Version Checker changes without waiting for app review

Once the plugin is in your store build, Capgo live updates push your JavaScript, HTML and CSS changes to users in minutes.

Start with Capgo