Skip to content

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
developfrom
feature/MOBILE-645-integration-framework
Open

sergeysozinov wants to merge 3 commits into
developfrom
feature/MOBILE-645-integration-framework

Conversation

@sergeysozinov

Copy link
Copy Markdown
Collaborator

sozinov 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 unknown fallbacks 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

@sergeysozinov sergeysozinov changed the title MOBILE-646: Pass the app framework and versions to the native SDKs MOBILE-646: Pass the app framework and versions to the native SDKs [Merge after native 2.18.0] Dec 1, 2026
@sergeysozinov sergeysozinov changed the title MOBILE-646: Pass the app framework and versions to the native SDKs [Merge after native 2.18.0] MOBILE-645: Pass the app framework and versions to the native SDKs [Merge after native 2.18.0] Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants