Skip to content
easyhooonPublic

About

Inspect WebView bridge messages in Android and iOS apps in real time, from a desktop app or on the device.

Topics

Resources

Code of conduct

Stars

45 stars

Watchers

1 watching

Forks

Latest commit

 

History

776 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Featured in Android Weekly #748

Dari

English | 한국어

Maven Central Swift versions Platforms Documentation Architecture diagram

Dari (다리) means "bridge" in Korean. Dari is a tool for inspecting WebView bridge communication in Android and iOS apps in real time.

Dari captures and visualizes the WebView JavaScript bridge messages between your web content and native code, with each request and response paired. The Dari Desktop App shows them from Android and iOS apps alike, on macOS, Windows and Linux. Android and iOS apps also get an in-app inspector on the device.

📥 Download the Desktop App · 📖 Documentation — Setup guide, configuration reference, and API docs.

Desktop App

See the bridge messages of a connected debug build on your computer, on a bigger screen. No proxy, certificate or port setup: Android apps connect over adb, iOS apps from a Simulator or a USB device on a Mac.

dari-2.1-demo-linkedin.mp4

Dari desktop app showing bridge messages from the iOS sample app in the Simulator

  • One inspector for both platforms: live messages from an Android device or emulator, or an iOS Simulator or USB device, with the request and response side by side
  • Foldable JSON with Expand all / Collapse all and one-click Copy, plus text and JSON export
  • Response Time view per handler: calls, errors and avg/min/max, slowest first, with averages of 500 ms or more highlighted
  • Optional masking of tokens, passwords and cookies, applied on the device before data leaves it
  • In-app updates on every supported OS
OS Architecture Download Inspects Notes
macOS 10.15+ Apple Silicon, Intel .dmg or the install script Android, iOS Signed and notarized
Windows x64 .exe, or .msi for Group Policy / Intune Android Not code-signed, so SmartScreen may warn on first run
Linux (preview) x64 .deb (Debian 13, Ubuntu 24.04+) or .tar.gz (other distributions) Android Tested on Debian 13 with Xfce on X11

Android apps connect through adb on every OS. iOS apps need a Mac, because Simulators run only there and USB devices are reached through macOS's usbmuxd; Wi-Fi connections are not offered for iOS.

Requires dari 2.0.0 or later in your app's debug build on Android, or the Dari Swift package 3.0.0 or later on iOS. Android apps still on 1.x can't connect until they upgrade.

Install from the terminal on macOS:

curl -fsSL https://raw.githubusercontent.com/easyhooon/dari/main/scripts/install-desktop.sh | bash

See the Desktop App guide for requirements and troubleshooting.

Platform Support

Android iOS
Package dari + dari-noop (Maven Central) Dari Swift package (SPM, 3.0.0+)
Minimum OS Android 8.0 (API 26) iOS 16
Web → App / App → Web capture ✅ ✅
Tags, displayName, fire-and-forget, page URL, environment labels ✅ ✅
Capture without manual calls Gradle plugin (2.6.0+) autoCapture (3.1.0+) or @DariBridge macro (3.2.0+)
Kotlin Multiplatform (bridge in commonMain) ✅ dari-kmp (3.7.0+), runs on dari ✅ dari-kmp (3.7.0+), runs on the Swift package. No Protocol Buffers
In-app inspector (list, detail, notification, shake-to-open, launcher shortcut) ✅ △ List, detail, search and export, opened from your debug menu
Desktop App ✅ Device or emulator over adb, on macOS, Windows and Linux ✅ Simulator or USB device, macOS only
Masking of sensitive values ✅ In-app and desktop ✅ In-app and desktop, plus your own rules for the desktop (setPayloadRedactor)
Text / JSON export ✅ In-app and desktop ✅ In-app and desktop
Protocol Buffers inspection ✅ ✅ Manual interceptor calls
retentionPeriod cleanup ✅ ✅
Messages kept across relaunches ✅ ✅ Opt-in with persistsMessages
Release builds dari-noop (same API, no capture code) Call start() only under #if DEBUG

Why Dari?

Debugging an app that embeds a WebView usually means sprinkling logs across bridge handlers and scrolling Logcat or the Xcode console to match requests with responses. Dari gives you:

  • Every Web ↔ App bridge call in one list, with request/response paired by requestId
  • Pretty-printed JSON payloads, status (IN_PROGRESS / SUCCESS / ERROR), and timing
  • One desktop app for Android and iOS, on macOS, Windows or Linux
  • On Android, a live notification and shake-to-open, so the in-app inspector is one tap away while testing
  • On iOS, an in-app inspector (DariUI) you open from your debug menu, for testing on a device without a Mac
  • Nothing in production: dari-noop on Android, #if DEBUG on iOS

Quick Start

Android

// app/build.gradle.kts
debugImplementation("io.github.easyhooon:dari:<latest-version>")
releaseImplementation("io.github.easyhooon:dari-noop:<latest-version>")

Dari initializes itself through androidx.startup. Call the interceptor where requests enter your bridge and where responses leave it, not in each handler:

val interceptor = Dari.createInterceptor(tag = "main")

@JavascriptInterface
fun onBridgeRequest(handlerName: String, requestId: String, data: String?) {
    interceptor?.onWebToAppRequest(handlerName, requestId, data)
    // … dispatch to handlers, which reply through sendResponseToWeb
}

private fun sendResponseToWeb(handlerName: String, requestId: String, isSuccess: Boolean, data: String) {
    interceptor?.onWebToAppResponse(handlerName, requestId, data, isSuccess)
    // … evaluateJavascript
}

Run the app, trigger a bridge call, and tap the Dari notification or open the Desktop App. To keep Dari out of your bridge code, the optional Gradle plugin (2.6.0+) inserts these calls at build time.

iOS

Add https://github.com/easyhooon/dari as a Swift package (from 3.0.0) and link the Dari library:

import Dari

#if DEBUG
try? Dari.shared.start()
#endif

let dari = Dari.shared.interceptor(tag: "main")

// WKScriptMessageHandler
func userContentController(_ controller: WKUserContentController, didReceive message: WKScriptMessage) {
    dari.onWebToAppRequest(handlerName: message.name, requestId: callbackId, requestData: json)
    // … handle, then reply
    dari.onWebToAppResponse(handlerName: message.name, requestId: callbackId, responseData: result, isSuccess: true)
}

Run the app in a Simulator or on a USB-attached device and open the Desktop App on the same Mac. To skip the manual calls, pass autoCapture (3.1.0+) to start() or mark the handler with @DariBridge from DariMacros (3.2.0+). To check messages on the device without a Mac, also link DariUI and call Dari.shared.presentInspector() (3.5.0+).

Kotlin Multiplatform

For a bridge in commonMain, add dari-kmp (3.7.0+) to the shared module, then set up the Android and iOS apps as above:

// shared/build.gradle.kts
commonMain.dependencies {
    implementation("io.github.easyhooon:dari-kmp:<latest-version>")
}
private val interceptor = DariKmp.createInterceptor(tag = "main")

The interceptor is the same DariInterceptor as on Android. On iOS it forwards to the Swift package found at runtime, and returns null when the package is missing. See the Kotlin Multiplatform guide.

Guides

Android iOS
Setup Setup iOS guide
Capture without manual calls Gradle plugin Automatic capture, Macros
API Interceptor, Configuration and runtime API iOS guide
Kotlin Multiplatform Kotlin Multiplatform Kotlin Multiplatform
More Protocol Buffers, In-app inspector, Modules In-app inspector, Staging builds, Troubleshooting

Both platforms: Desktop App · Masking

In-app Inspector

iOS apps get one too, from the DariUI library (3.5.0+): a searchable list, Overview / Request / Response, and text or JSON export, opened from your debug menu. See the iOS guide. The rest of this section shows Android's.

Android apps also get an inspector on the device, inspired by Chucker: a live notification of recent bridge activity, a searchable list with status, handler and tag filters, Overview / Request / Response tabs, per-handler response times, text or JSON export, shake-to-open, a launcher shortcut, and dark mode.

Dari demo: bridge calls, notification, message detail

Launcher Shortcut Notification Message List
Overview Request Response
Tag Filter Settings Dark Mode

Sample Apps

  • sample/ (Android): a WebView demo with app/device info, toast, haptics, share sheet, clipboard, app settings and camera permission scenarios. It captures its bridge with the Gradle plugin.
  • sample-ios/ (iOS): a WKWebView demo with success, error, slow, no-response, fire-and-forget and masking scenarios. It captures its bridge with @DariBridge. Open it in Xcode 16 or later and run the DariSample scheme on a Simulator.
  • sample-kmp/ (Kotlin Multiplatform): a commonMain bridge that records through dari-kmp. sample runs it on Android; on iOS, run sample-kmp/run-on-simulator.sh.

Dari iOS sample app

Security & Privacy

Dari is intended for debug and internal builds. Bridge payloads may contain tokens, personal data, or other sensitive values, so avoid sharing exported messages without reviewing them first. Use dari-noop in release builds to keep the same API surface without storing or displaying bridge messages. On iOS, call Dari.shared.start() only in builds you inspect: while it runs, any process that can reach the device's loopback can read the recorded messages.

The desktop app sends crash reports to Sentry by default: the exception type, stack trace, and OS, architecture and Java versions. Exception messages, bridge messages, host names and IP addresses are never sent. Turn it off in Settings → Privacy → Send crash reports.

Project Stats

Star History

GitHub stars for easyhooon/dari over time. This live chart shows repository stars, not library downloads.

Dari GitHub star history

Download history

Scarf downloads for Dari

Observed Dari rolling 30-day downloads

Rolling 30-day Maven Central requests for io.github.easyhooon:dari, observed daily via Scarf. See how it is measured.

Support

If Dari saves you debugging time, you can star the repository, buy me a coffee on Ko-fi or sponsor on GitHub.

License

Copyright 2026 easyhooon

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Inspect WebView bridge messages in Android and iOS apps in real time, from a desktop app or on the device.

Topics

Resources

Code of conduct

Stars

45 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages