Skip to content

MOBILE-621: Pass the IDFA to the SDK in the example (merge after mindbox-sdk 2.17.0) - #250

Draft
justSmK wants to merge 1 commit into
developfrom
feature/MOBILE-621-example-idfa
Draft

justSmK wants to merge 1 commit into
developfrom
feature/MOBILE-621-example-idfa

Conversation

@justSmK

@justSmK justSmK commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

https://tracker.yandex.ru/MOBILE-621

The example passes the IDFA the way the integration guide shows: on iOS it passes the IDFA at launch and on every return to the foreground with or without consent, and @sparkfabrik/react-native-idfa-aaid shows the tracking prompt while the user has not answered. The manifest declares the tracking host and Device ID as linked, tracking, developer advertising, like the native Example in mindbox-cloud/ios-sdk#847; the diagnostics record was a stale copy of the SDK manifest. The README says what to change with another domain.

Draft until the release with the setter (#240): the example takes mindbox-sdk 2.16.0 from npm, which has no setAdvertisingIdentifier, so the call throws at runtime until the dependency is raised. The bump and pod update join this PR after that release.

Checked locally with the wrapper from #240 and pods from ios-sdk develop, not committed: tsc gives no new errors, eslint is clean, the iOS Debug build passes. On an iOS 26.5 simulator with RN 0.88.1 and the new architecture the library shows the prompt with the usage text and resolves, and the active event asks again after the notification prompt closes. A test UUID went to api-tracking.mindbox.ru and was accepted; null cleared it. ./gradlew assembleDebug passes with the library autolinked. npm marks the library deprecated ("Package no longer supported") and its repository is archived.

The example now follows the integration guide: on iOS it passes the IDFA
at launch and on every return to the foreground, and the library asks
for tracking permission while the user has not answered. The manifest
declares the tracking host and Device ID as linked, used for tracking,
for developer advertising; the diagnostics record was a stale copy of
the SDK manifest, which declares that data itself.

It takes mindbox-sdk from npm, where 2.16.0 has no
setAdvertisingIdentifier, so the call throws at runtime until a version
with the setter is released and the dependency is raised to it.

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.

🟡 Changes recommended

The example still uses mindbox-sdk 2.16.0, which lacks setAdvertisingIdentifier and causes unhandled iOS rejections at launch and foreground events; the SDK and lockfiles need updating to compatible releases.

1 open issue
1 file not reviewed
  • example/exampleApp/package-lock.json: Generated file
What changed in this PR

Prepares the React Native example to supply the iOS advertising identifier explicitly, following the SDK’s app-provided IDFA flow.

Changes:

  • Adds IDFA retrieval and forwarding at launch and on foreground events.
  • Adds the identifier library, native dependency lock, and tracking-permission usage text.
  • Updates privacy declarations and documents tracking-host configuration.
File Description
example/​exampleApp/​src/​utils/​AdvertisingIdentifier.tsx Retrieves and forwards IDFA, passing null on retrieval failure.
example/​exampleApp/​src/​screens/​HomeScreen.tsx Invokes IDFA forwarding on mount and foreground events.
example/​exampleApp/​README.md Documents IDFA handling and tracking-host setup.
example/​exampleApp/​package.json Adds the advertising-identifier library.
example/​exampleApp/​package-lock.json Locks the new library to version 1.2.0.
example/​exampleApp/​ios/​Podfile.lock Records the library’s native iOS dependency.
example/​exampleApp/​ios/​exampleApp/​PrivacyInfo.xcprivacy Updates Device ID tracking declarations and removes the stale diagnostics entry.
example/​exampleApp/​ios/​exampleApp/​Info.plist Adds tracking-permission usage text.

Review effort: Balanced


try {
const { id } = await ReactNativeIdfaAaid.getAdvertisingInfo()
MindboxSdk.setAdvertisingIdentifier(id)
@justSmK justSmK changed the title MOBILE-621: Pass the IDFA to the SDK in the example MOBILE-621: Pass the IDFA to the SDK in the example (merge after mindbox-sdk 2.17.0) Nov 17, 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.

2 participants