Repository navigation
MOBILE-645: Pass the app framework and versions to the native SDKs [Merge after native 2.18.0] - #258
Open
sergeysozinov wants to merge 3 commits into
Open
sergeysozinov wants to merge 3 commits into
sergeysozinov wants to merge 3 commits into
Conversation
added 3 commits
November 17, 2026 15:51
initialize adds integrationFramework to the payload it already sends to the native module: "react-native/<version>; mindbox-react-native/<version>", with "expo/<version>" in between in an Expo app. A version that cannot be read, has characters out of the format or is longer than 36 characters becomes "unknown". The native modules hand the string to the internal configuration field of the Android and iOS SDKs. The wrapper version is a constant that the release scripts bump and check next to target-version.
…ield An app can pin an older mobile-sdk in its own module. The call to integrationFramework then throws NoSuchMethodError, and initialize was rejected before Mindbox.init. The call now ignores a LinkageError, so the SDK initializes without the value.
An app that pins an Android SDK without the field fails exactly with NoSuchMethodError on this call; naming it shows what the guard is for.
There was a problem hiding this comment.
🔵 Needs a closer look
The new iOS SPI and Android opt-in APIs cannot be verified against Mindbox 2.16.0 in this snapshot, while Jest mocks those boundaries, leaving compatibility dependent on native builds and real Expo initialization.
No open issues 🎉
What changed in this PR
Adds framework and version metadata to SDK initialization so the native Mindbox SDKs receive React Native, Expo (when detected), and wrapper version information.
Changes:
- Builds a validated framework string with
unknownfallbacks and passes it through both native bridges. - Adds tests for version formatting, fallback behavior, and initialization payloads.
- Updates release automation to keep the embedded wrapper version synchronized.
| File | Description |
|---|---|
src/integrationFramework.ts |
Detects and formats framework and wrapper versions. |
src/index.tsx |
Includes framework metadata in the initialization payload. |
src/__tests__/integrationFramework.test.ts |
Tests formatting, fallbacks, and payload forwarding. |
ios/MindboxSdk.swift |
Passes metadata into the iOS SDK configuration. |
git-release-branch.sh |
Updates the embedded wrapper version during local release preparation. |
android/src/main/java/com/mindboxsdk/MindboxSdkModule.kt |
Passes metadata into Android configuration with a missing-method fallback. |
.github/workflows/manual-prepare_release_branch.yml |
Updates the embedded wrapper version during automated release preparation. |
Review effort: Balanced
Vailence
approved these changes
Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://tracker.yandex.ru/MOBILE-645