Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d9bc0e7
Merge pull request #217 from mindbox-cloud/master
itmindbox Aug 26, 2026
7deed96
MOBILE-342: Публичное API встроенных блоков (#220)
Vailence Sep 7, 2026
7829bf0
MOBILE-0000: Bump mindbox-common together with mobile-sdk on release …
Vailence Sep 9, 2026
16bb89b
Bump RN SDK versions: core=2.16.0-rc, android=2.16.0-rc, ios=2.16.0-rc
github-actions[bot] Sep 11, 2026
e5e5328
chore: release 2.16.0-rc
AndreyEmtsov Sep 11, 2026
bb82dec
Merge pull request #223 from mindbox-cloud/release/2.16.0-rc
AndreyEmtsov Sep 11, 2026
f86685a
MOBILE-557: Три исхода, стратегия загрузки и анимация появления встро…
Vailence Oct 6, 2026
5036474
MOBILE-389: Add disableTrackingIds support
enotniy Oct 8, 2026
f1621a7
MOBILE-389: Document when disableTrackingIds takes effect
enotniy Oct 8, 2026
aeef73b
MOBILE-588: Let the embedded block's props reach the native view on A…
sergeysozinov Oct 14, 2026
ac0e4e1
fix: Take the GitLab host from a secret and fail on a non-201 trigger…
justSmK Oct 14, 2026
a5e494a
fix: Take the GitLab host from a secret and fail on a non-201 trigger…
justSmK Oct 14, 2026
2e8000a
MOBILE-0000: Drop comments from the embedded block code (#230)
justSmK Oct 26, 2026
b351dac
MOBILE-0000: Cut the public API docs down to the host contract (#231)
justSmK Oct 26, 2026
6541c9a
MOBILE-0000: Use a GitHub App token instead of the PAT in release flo…
justSmK Oct 28, 2026
18073c7
MOBILE-385: Raise compileSdk and targetSdk to 36
sergeysozinov Oct 28, 2026
090f37e
Merge pull request #235 from mindbox-cloud/mission/stories
justSmK Oct 30, 2026
c1ede0b
Merge pull request #225 from mindbox-cloud/feature/MOBILE-389-disable…
enotniy Oct 30, 2026
53ad9df
Merge pull request #236 from mindbox-cloud/fix_changelog
sergeysozinov Oct 30, 2026
b38a8a6
Bump RN SDK versions: core=2.16.0, android=2.16.0, ios=2.16.0
github-actions[bot] Oct 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/distribute-develop-mission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
branch: ${{ github.base_ref }}
secrets:
GITLAB_TRIGGER_TOKEN: ${{ secrets.GITLAB_TRIGGER_TOKEN }}
GITLAB_HOST: ${{ secrets.GITLAB_HOST }}
1 change: 1 addition & 0 deletions .github/workflows/distribute-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
app_ref: ${{ inputs.app_ref }} # optional override for GitLab ref
secrets:
GITLAB_TRIGGER_TOKEN: ${{ secrets.GITLAB_TRIGGER_TOKEN }}
GITLAB_HOST: ${{ secrets.GITLAB_HOST }}
1 change: 1 addition & 0 deletions .github/workflows/distribute-release-support-mission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ jobs:
branch: ${{ github.event.pull_request.head.ref }}
secrets:
GITLAB_TRIGGER_TOKEN: ${{ secrets.GITLAB_TRIGGER_TOKEN }}
GITLAB_HOST: ${{ secrets.GITLAB_HOST }}
13 changes: 10 additions & 3 deletions .github/workflows/distribute-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on:
secrets:
GITLAB_TRIGGER_TOKEN:
required: true
GITLAB_HOST:
required: true

permissions:
contents: read
Expand Down Expand Up @@ -65,7 +67,7 @@ jobs:
- name: Trigger build workflow in react-native-app repo (override strict; else same->develop)
shell: bash
env:
GITLAB_HOST: mindbox.gitlab.yandexcloud.net
GITLAB_HOST: ${{ secrets.GITLAB_HOST }}
APP_PROJECT_ID: "1512"
DEFAULT_APP_REF: develop

Expand All @@ -77,6 +79,11 @@ jobs:
run: |
set -euo pipefail

if [[ -z "${GITLAB_HOST:-}" ]]; then
echo "::error::Secret GITLAB_HOST is empty: set it to the GitLab host name, without https://"
exit 1
fi

# Trim override so " " becomes empty
APP_REF_OVERRIDE="$(printf '%s' "${APP_REF_OVERRIDE:-}" | xargs)"

Expand Down Expand Up @@ -108,7 +115,7 @@ jobs:
tmp_body="$(mktemp)"

local code
code="$(curl -sS -o "$tmp_body" -w '%{http_code}' --location \
code="$(curl -sS -o "$tmp_body" -w '%{http_code}' \
--retry 3 --retry-all-errors --retry-delay 2 \
"https://${GITLAB_HOST}/api/v4/projects/${APP_PROJECT_ID}/trigger/pipeline" \
--form "token=${GITLAB_TRIGGER_TOKEN}" \
Expand All @@ -124,7 +131,7 @@ jobs:
echo "Response body:"
echo "$body"

if [[ "$code" == "200" || "$code" == "201" ]]; then
if [[ "$code" == "201" ]]; then
local web_url
web_url="$(
printf '%s\n' "$body" |
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/manual-prepare_release_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ jobs:

##############################################################################
# 2) Android build.gradle: bump cloud.mindbox:mobile-sdk:<version>
# mindbox-common goes with it: it is an implementation dependency of mobile-sdk, so the
# wrapper takes it compileOnly and both must stay on the same version.
##############################################################################
echo "→ Bumping Android SDK in android/build.gradle"
sed -i "s|\(api 'cloud.mindbox:mobile-sdk:\).*|\1$AND_VER'|" android/build.gradle
sed -i "s|\(compileOnly 'cloud.mindbox:mindbox-common:\).*|\1$AND_VER'|" android/build.gradle
git add android/build.gradle

##############################################################################
Expand Down Expand Up @@ -180,9 +183,17 @@ jobs:
runs-on: ubuntu-latest
needs: bump_and_branch
steps:
- name: Create App token
id: app-token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
client-id: ${{ vars.MOBILE_CI_APP_CLIENT_ID }}
private-key: ${{ secrets.MOBILE_CI_APP_PRIVATE_KEY }}
permission-contents: read
permission-pull-requests: write
- name: Build PR body and open PR
env:
GITHUB_TOKEN: ${{ secrets.PAT_FOR_TRIGGERING_BRANCH_PROTECTION }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
SRC: ${{ needs.bump_and_branch.outputs.release_branch }}
DST: ${{ github.event.inputs.target_branch }}
REPO: ${{ github.repository }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-common-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
branch: ${{ github.ref_name }}
secrets:
PAT_FOR_TRIGGERING_BRANCH_PROTECTION: ${{ secrets.PAT_FOR_TRIGGERING_BRANCH_PROTECTION }}
MOBILE_CI_APP_PRIVATE_KEY: ${{ secrets.MOBILE_CI_APP_PRIVATE_KEY }}

publish-from-pr:
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
Expand All @@ -46,4 +46,4 @@ jobs:
with:
branch: ${{ github.base_ref }}
secrets:
PAT_FOR_TRIGGERING_BRANCH_PROTECTION: ${{ secrets.PAT_FOR_TRIGGERING_BRANCH_PROTECTION }}
MOBILE_CI_APP_PRIVATE_KEY: ${{ secrets.MOBILE_CI_APP_PRIVATE_KEY }}
19 changes: 13 additions & 6 deletions .github/workflows/publish-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
required: true
type: string
secrets:
PAT_FOR_TRIGGERING_BRANCH_PROTECTION:
MOBILE_CI_APP_PRIVATE_KEY:
required: true

permissions:
Expand Down Expand Up @@ -106,19 +106,26 @@ jobs:
startsWith(github.head_ref, 'release/') &&
github.base_ref == 'master'
runs-on: ubuntu-latest
env:
# gh uses this PAT, not the workflow GITHUB_TOKEN — needed so the merge PR
# re-triggers branch-protection checks. Job-level `permissions:` only scope
# the workflow token, so they don't apply to these gh calls.
GITHUB_TOKEN: ${{ secrets.PAT_FOR_TRIGGERING_BRANCH_PROTECTION }}
steps:
- name: Create App token
id: app-token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
client-id: ${{ vars.MOBILE_CI_APP_CLIENT_ID }}
private-key: ${{ secrets.MOBILE_CI_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- name: Checkout develop branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: develop
- name: Create Pull Request
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: gh pr create --base develop --head master --title "Merge 'master' into 'develop' after release" --body "Automated Pull Request to merge 'master' into 'develop' after release"
- name: Merge Pull Request
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
pr_number=$(gh pr list --base develop --head master --json number --jq '.[0].number')
gh pr merge "$pr_number" --merge --auto
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [Unreleased]

### Changes
- Upgrade Android SDK dependency to v2.16.0
- Upgrade iOS SDK dependency to v2.16.0


## [2.16.0-rc] - 2026-09-11

### Changes
- Upgrade Android SDK dependency to v2.16.0-rc
- Upgrade iOS SDK dependency to v2.16.0-rc


## [2.15.3] - 2026-08-26

### Changes
Expand Down
11 changes: 8 additions & 3 deletions MindboxSdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ Pod::Spec.new do |s|

s.source_files = "ios/**/*.{h,m,mm,swift}"

s.dependency "React-Core"
s.dependency "Mindbox", "2.16.0"
s.dependency "MindboxNotifications", "2.16.0"

s.dependency "Mindbox", "2.15.3"
s.dependency "MindboxNotifications", "2.15.3"
# Only this call defines RCT_NEW_ARCH_ENABLED for the pod, which MindboxEmbeddedBlockView.mm splits on.
if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)
else
s.dependency "React-Core"
end
end
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Follow the installation process detailed [here](https://developers.mindbox.ru/do
```markdown
npm i --save mindbox-sdk
```
The package requires React Native 0.71 or newer, on the old or the new architecture.

2. For iOS, make sure to install the pods:
```markdown
Expand Down
5 changes: 4 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ buildscript {

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: "com.facebook.react"

def getExtOrDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['MindboxSdk_' + name]
Expand Down Expand Up @@ -126,5 +127,7 @@ dependencies {
// noinspection GradleDynamicVersion
api 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
api 'cloud.mindbox:mobile-sdk:2.15.4'
api 'cloud.mindbox:mobile-sdk:2.16.0'
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.8.7"
compileOnly 'cloud.mindbox:mindbox-common:2.16.0'
}
6 changes: 3 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MindboxSdk_kotlinVersion=1.5.31
MindboxSdk_compileSdkVersion=29
MindboxSdk_buildToolsVersion=29.0.2
MindboxSdk_targetSdkVersion=29
MindboxSdk_compileSdkVersion=36
MindboxSdk_buildToolsVersion=35.0.0
MindboxSdk_targetSdkVersion=36
3 changes: 3 additions & 0 deletions android/src/main/java/com/mindboxsdk/MindboxSdkModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ class MindboxSdkModule(private val reactContext: ReactApplicationContext) : Reac
if (payload.has("shouldIncludeVersionCode")) {
configurationBuilder.shouldIncludeVersionCode(payload.optBoolean("shouldIncludeVersionCode", true))
}
if (payload.has("disableTrackingIds")) {
configurationBuilder.disableTrackingIds(payload.optBoolean("disableTrackingIds", false))
}
val configuration = configurationBuilder.build()

val handler = Handler(context.mainLooper)
Expand Down
3 changes: 2 additions & 1 deletion android/src/main/java/com/mindboxsdk/MindboxSdkPackage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.facebook.react.ReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ViewManager
import com.mindboxsdk.embedded.MindboxEmbeddedBlockViewManager


class MindboxSdkPackage : ReactPackage {
Expand All @@ -12,6 +13,6 @@ class MindboxSdkPackage : ReactPackage {
}

override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
return emptyList()
return listOf(MindboxEmbeddedBlockViewManager())
}
}
26 changes: 26 additions & 0 deletions android/src/main/java/com/mindboxsdk/embedded/EmbeddedBlockWire.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.mindboxsdk.embedded

import cloud.mindbox.mobile_sdk.annotations.InternalMindboxApi
import cloud.mindbox.mobile_sdk.embedded.MindboxEmbeddedBlockAppearance
import cloud.mindbox.mobile_sdk.embedded.MindboxEmbeddedBlockLoadingStrategy

@OptIn(InternalMindboxApi::class)
internal object EmbeddedBlockWire {
const val OUTCOME_LOAD = "load"
const val OUTCOME_EMPTY = "empty"
const val OUTCOME_FAIL = "fail"

fun loadingStrategyOf(word: String?): MindboxEmbeddedBlockLoadingStrategy? = when (word) {
null, "", "automatic" -> MindboxEmbeddedBlockLoadingStrategy.AUTOMATIC
"placeholder" -> MindboxEmbeddedBlockLoadingStrategy.PLACEHOLDER
"hidden" -> MindboxEmbeddedBlockLoadingStrategy.HIDDEN
else -> null
}

fun nameOf(appearance: MindboxEmbeddedBlockAppearance): String = when (appearance) {
MindboxEmbeddedBlockAppearance.PLACEHOLDER -> "placeholder"
MindboxEmbeddedBlockAppearance.CONTENT -> "content"
MindboxEmbeddedBlockAppearance.ERROR -> "error"
MindboxEmbeddedBlockAppearance.COLLAPSED -> "collapsed"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package com.mindboxsdk.embedded

import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.uimanager.events.Event

internal class AppearanceChangeEvent(
surfaceId: Int,
viewTag: Int,
private val appearance: String,
private val isRevealAnimated: Boolean,
private val revealDurationMs: Int,
) : Event<AppearanceChangeEvent>(surfaceId, viewTag) {
override fun getEventName(): String = EVENT_NAME

// React Native keeps only the last queued event of a name per view; JS needs every look change.
override fun canCoalesce(): Boolean = false

override fun getEventData(): WritableMap = Arguments.createMap().apply {
putString("appearance", appearance)
putBoolean("animated", isRevealAnimated)
putInt("revealDurationMs", if (isRevealAnimated) revealDurationMs else 0)
}

companion object {
const val EVENT_NAME = "topAppearanceChange"
}
}

internal class BlockOutcomeEvent(
surfaceId: Int,
viewTag: Int,
private val outcome: String,
private val reason: String?,
) : Event<BlockOutcomeEvent>(surfaceId, viewTag) {
override fun getEventName(): String = EVENT_NAME

// React Native keeps only the last queued event of a name per view; JS needs every outcome.
override fun canCoalesce(): Boolean = false

override fun getEventData(): WritableMap = Arguments.createMap().apply {
putString("outcome", outcome)
putString("reason", reason.orEmpty())
}

companion object {
const val EVENT_NAME = "topBlockOutcome"
}
}
Loading
Loading