Skip to content

3.8.0

Latest

Choose a tag to compare

@easyhooon easyhooon released this 30 Nov 04:05
· 2 commits to main since this release
c333900

Dari now records whether a bridge message actually reached the page, follows androidx.web WebContent pages across re-attached views, and keeps bridge calls on the right page after a WebView is gone. dari, dari-core, dari-noop, dari-runtime, dari-kmp, dari-inspector-protocol and dari-gradle-plugin 3.8.0 are on Maven Central, and the Dari Swift package is at 3.8.0. The wire protocol stays at version 1, so any app and desktop combination from 2.0.0 still connects.

Behavior changes

  • The Gradle plugin now also routes WebView.evaluateJavascript call sites through DariHooks, as it already does for addJavascriptInterface. Use plugin 3.8.0 with dari / dari-noop 3.8.0: plugin 3.8.0 with dari 3.7.0 fails on the first evaluateJavascript call. (#316)
  • MessageEntry gains a delivery property. Binary callers of the 3.7 constructors keep working, but code compiled against 3.7 that calls MessageEntry.copy (for example a custom DariPayloadRedactor) must be recompiled; source stays compatible. (#316)

What's Changed

  • feat: record whether a message reached the page by @easyhooon in #316
    • Closes #313. A Web → App response or an App → Web request now carries a delivery state (PENDING, DELIVERED, FAILED), separate from its status. The in-app, iOS and desktop detail views show it; a message still pending 5 s after it was sent reads "Not confirmed: the page never ran it".
    • Android: a message is marked delivered when a script run on its own WebView names its requestId in quotes, or when the page answers an App → Web request. Custom interceptors get DariInterceptor.onDeliveryChanged (default no-op).
    • iOS auto capture marks scripts DELIVERED from evaluateJavaScript completions, or FAILED when the script threw or WebKit couldn't run it.
    • Existing entries load with no delivery state (DB 7 → 8). Older desktops ignore the new field.
  • feat(sample): WebContent screen and page URL fix after re-attach by @easyhooon in #312
    • Bridge calls from an androidx.web WebContent page keep their interceptor, page URL and tag when the page moves to a new WebContentView (rotation, navigation back). WebContentView is matched by class name, so dari has no androidx.web dependency.
    • Adds a WebContent screen to the Android sample and a WebContent section to the interceptor guide.
  • fix(auto): keep bridge calls on their page after the WebView is collected by @easyhooon in #315
    • Closes #314. A bridge call that arrived after its WebView was garbage collected could be recorded under another WebView's page. It now stays on the page it was registered on, and a bridge shared by several WebViews records under each WebView's own JS name.
  • Docs and samples: the Kotlin Multiplatform guide (#305) and README section (#308), dari-kmp traffic in the Android sample (#306), and troubleshooting for an empty desktop detail pane (#309).

Desktop app downloads

Installers for macOS (Apple Silicon and Intel, signed and notarized), Windows (.exe and .msi) and Linux x64 (preview, .deb and .tar.gz) are attached below, with SHA-256 files. See the Desktop App guide for install steps, or install from the terminal on macOS:

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

Full Changelog: 3.7.0...3.8.0