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-* plugin | None. |
@dvai-bridge/ios (Swift) | None. |
@dvai-bridge/android (Kotlin) | None. |
| RN ≥ 0.77 with Bridgeless ON | Optional — 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-platformBackendKindis the union of every iOS + Android backend (auto/llama/foundation/coreml/mlx/mediapipe/litert). The TS facade pre-validates againstPlatform.OSand throwsbackendUnavailablefor wrong-platform selections — without crossing the bridge. See React Native SDK guide.useDVAIBridgeState()React hook — subscribes to native progress events viaNativeEventEmitter(Combine on iOS,Flowon Android) and re-fetchesstatus()on terminal events. Returns{ isReady, baseUrl, port, backend, modelId, lastProgress }— ready to render in a Compose-style React tree.- iOS bridge —
DVAIBridgeNative.podspecwiths.dependency 'DVAIBridge'.ios/DVAIBridgeNative.{h,mm,swift}forwards JS calls toDVAIBridge.sharedand mapsProgressEvent.Phaseto JS-side{ kind, phase, percent, message }discriminators. - Android bridge — Kotlin module that calls
co.deepvoiceai.bridge.DVAIBridge. Depends onco.deepvoiceai:dvai-bridge:2.2.0via the consumer's GitHub Packages Maven setup. Dual old-arch + new-arch source sets selected bynewArchEnabled— 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 underlyingDVAIBridgeumbrella raises the iOS minimum to 18.1 at runtime. - CocoaPods consumers inherit the same backend caveats as the iOS Native SDK —
mlxandfoundationare 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.x→v2.1.0— see v2.0 → v2.1 migration for the Android SDK + LiteRT backend + android-shared-core extraction details.v1.6.x→v2.0.0— see v1.6 → v2.0 migration for the iOS SDK + MLX + DVAISharedCore extraction details.
