Cordova / Capacitor

Install the @ansight/capacitor bridge for Cordova-family and Ionic apps, then capture native telemetry and inspect both DOM and native visual trees.

@ansight/capacitor brings the native Ansight iOS and Android runtimes to Cordova-family web-view applications built with Capacitor. It exposes telemetry, enrollment, screenshots, touch capture, logs, artifacts, guarded native tools, DOM inspection, route tracking, lifecycle tracking, and JavaScript error capture through one TypeScript API.

Status: The Cordova-family Capacitor SDK is in beta. The current adapter targets Capacitor 8; classic Apache Cordova projects should not assume drop-in compatibility until a dedicated adapter is available.

Supported Targets

TargetRequirement
Capacitor8.x
Node22 or newer
AndroidAPI 24 or newer, Java 21
iOS / iPadOS15 or newer
npm package@ansight/capacitor 1.0.2-preview.7

Quick Start

npm install @ansight/capacitor
npx cap sync
import Ansight from "@ansight/capacitor";

await Ansight.initializeAndActivate(
  Ansight.createOptionsBuilder()
    .withAnsightDefaults()
    .withReadOnlyToolAccess()
    .withDomTools()
    .withErrorCapture()
    .build(),
);

await Ansight.connect(null, { clientName: "My Capacitor App" });

UI Inspection

  • dom.* tools inspect the HTML document rendered inside the app WebView.
  • Native ui.* tools inspect the surrounding UIKit or Android view hierarchy.
  • Optional dom.invoke_action can click, focus, blur, or set control values under write access.

Use Cordova / Capacitor Security before putting the package, enrollment UI, DOM inspection, or broad native tools in a distributable build.