Skip to content

Migrating from v2.1 to v2.2

v2.2 is the Phase 3E release. A new @dvai-bridge/react-native TurboModule wraps the v2.1 iOS DVAIBridge SDK and the v2.1 Android DVAIBridge SDK behind a shared TypeScript API. RN ≥ 0.77 (Bridgeless ON) consumers can drop the package into their app and call DVAIBridge.start(...) from JS / TS.

Every v2.2 change is additive — no breaking change for any existing consumer. The OpenAI-compatible HTTP surface, the JS Capacitor shim, the iOS SDK, the Android SDK, and every *-core package are all unchanged.

Quick decision matrix

If you are using…Migration
@dvai-bridge/core (web)None.
@dvai-bridge/transformers (web)None.
@dvai-bridge/capacitor + any capacitor-* pluginNone.
@dvai-bridge/ios (Swift)None.
@dvai-bridge/android (Kotlin)None.
RN ≥ 0.77 with Bridgeless ONOptional — install @dvai-bridge/react-native to drop the Capacitor wrapping layer.
RN ≤ 0.73 (legacy bridge / Bridgeless OFF)Stay on the Capacitor packages — @dvai-bridge/react-native is TurboModule-only.

What's new (additive — no migration needed)

  • @dvai-bridge/react-native — TurboModule that surfaces the same 8-method DVAIBridge API to JS. Cross-platform BackendKind is the union of every iOS + Android backend (auto / llama / foundation / coreml / mlx / mediapipe / litert). The TS facade pre-validates against Platform.OS and throws backendUnavailable for wrong-platform selections — without crossing the bridge. See React Native SDK guide.
  • useDVAIBridgeState() React hook — subscribes to native progress events via NativeEventEmitter (Combine on iOS, Flow on Android) and re-fetches status() on terminal events. Returns { isReady, baseUrl, port, backend, modelId, lastProgress } — ready to render in a Compose-style React tree.
  • iOS bridgeDVAIBridgeNative.podspec with s.dependency 'DVAIBridge'. ios/DVAIBridgeNative.{h,mm,swift} forwards JS calls to DVAIBridge.shared and maps ProgressEvent.Phase to JS-side { kind, phase, percent, message } discriminators.
  • Android bridge — Kotlin module that calls co.deepvoiceai.bridge.DVAIBridge. Depends on co.deepvoiceai:dvai-bridge:2.2.0 via the consumer's GitHub Packages Maven setup. Dual old-arch + new-arch source sets selected by newArchEnabled — so RN ≤ 0.74 → 0.85 mid-migration consumers link cleanly.

Requirements (for @dvai-bridge/react-native consumers)

  • React Native ≥ 0.77 (Bridgeless / TurboModule on by default). Older RN consumers stay on Capacitor or pin to the legacy @dvai-bridge/capacitor-* packages. The React Native module is TurboModule-only — Bridgeless must be ON.
  • Node ≥ 22 for the build / test toolchain.
  • iOS 15.1+ link target, Android minSdk 24. The underlying DVAIBridge umbrella raises the iOS minimum to 18.1 at runtime.
  • CocoaPods consumers inherit the same backend caveats as the iOS Native SDK — mlx and foundation are unavailable under CocoaPods. See the React Native SDK guide § iOS pod install for the SwiftPM-fallback recipe.

Versioning

All Android module versions bumped 2.1.0 → 2.2.0 via the dvaiBridgeVersion Gradle property in each module's gradle.properties. The $dvaiBridgeVersion interpolation in each module's build.gradle cross-package dep declarations means future bumps still touch only the root package.json.

CI

.github/workflows/test-react-native.yml runs bob build + Jest on Linux. iOS pod-lint and Android Gradle full-build aren't part of the CI matrix — no host consumer app to exercise autolinking. Mac developers verify manually before publishing.

Pre-existing migration

  • v2.0.xv2.1.0 — see v2.0 → v2.1 migration for the Android SDK + LiteRT backend + android-shared-core extraction details.
  • v1.6.xv2.0.0 — see v1.6 → v2.0 migration for the iOS SDK + MLX + DVAISharedCore extraction details.