Repository navigation
MOBILE-621: Pass the app's IDFA to the iOS SDK through a setter - #240
Merged
Merged
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
The iOS bridge depends on an unreleased setter absent from pinned Mindbox 2.16.0, so the final SDK API, dependency update, iOS build, and native IDFA revocation behavior require verification before merging.
No open issues 🎉
What changed in this PR
Adds an app-supplied IDFA setter to the React Native wrapper for the upcoming iOS SDK API. The PR remains a draft pending the iOS SDK release and dependency update.
Changes:
- Adds
setAdvertisingIdentifier(string | null)for iOS, with no action on Android. - Extends
disableTrackingIdsto suppress and clear the iOS identifier, while keeping initialization compatible with older native binaries. - Adds tests for forwarding, opt-out behavior, call order, and compatibility.
| File | Description |
|---|---|
| src/types/InitializationData.ts | Documents iOS behavior for disableTrackingIds. |
| src/index.tsx | Adds the public setter and clears the identifier before initialization when tracking is disabled. |
| src/__tests__/index.test.ts | Tests setter behavior and initialization compatibility. |
| ios/MindboxSdk.swift | Validates UUID strings and forwards identifiers or clearing requests to the SDK. |
| ios/MindboxSdk.m | Exposes the native setter to React Native. |
Review effort: Balanced
The iOS SDK no longer reads the IDFA itself, so an app on the wrapper had no way to hand it over. The value is a string: null, empty and zeros revoke, a string that is not a UUID is logged by the SDK and ignored. disableTrackingIds now covers iOS as well. The JS layer passes null instead of the value, and initialize clears the native state first, because the native SDK would otherwise send an identifier that was set before initialization. That clear is an optional call, so a JS bundle running over an older native binary still initializes.
justSmK
force-pushed
the
feature/MOBILE-621-idfa-setter
branch
from
November 13, 2026 12:24
7fc8596 to
56c54c0
Compare
justSmK
marked this pull request as ready for review
November 13, 2026 12:26
sergeysozinov
approved these changes
Nov 16, 2026
enotniy
approved these changes
Nov 16, 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-621
After MOBILE-390 the iOS SDK no longer reads the IDFA: the app passes it through
Mindbox.shared.setAdvertisingIdentifier(_:). The wrapper had no such method, so a React Native or Expo app would stop sending the IDFA once the wrapper moves to that iOS SDK.MindboxSdk.setAdvertisingIdentifier(string | null)forwards the value on iOS and does nothing on Android.null, an empty string and zeros revoke; a string that is not a UUID is logged by the SDK and ignored.disableTrackingIdsnow covers iOS too: the setter passesnull, andinitializeclears the native state first, because the native SDK sends an identifier that was set before initialization. That clear is an optional call, so a JS bundle running over an older native binary still initializes.Merge only after the iOS SDK release with the setter: the podspec still pins
Mindbox2.16.0, which does not have it, so the module does not compile for iOS yet. The pin bump joins this PR after that release.Checked: jest, eslint and tsc. On a simulator (RN 0.85, new architecture) with a local ios-sdk build a UUID went to the tracking host and was accepted, a malformed string was logged and ignored,
nullcleared the value.