Skip to content

feat(SDK-561): expose visitor usage consent APIs - #927

Merged
jferrao-itrbl merged 6 commits into
feature/SDK-548-uua-feature-parityfrom
feature/SDK-561-visitor-usage-tracked
Oct 19, 2026
Merged

jferrao-itrbl merged 6 commits into
feature/SDK-548-uua-feature-parityfrom
feature/SDK-561-visitor-usage-tracked

Conversation

@jferrao-itrbl

@jferrao-itrbl jferrao-itrbl commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

📝 Summary

Add Iterable.setVisitorUsageTracked and Iterable.getVisitorUsageTracked for UUA visitor consent parity (SDK-548).

🎟️ Jira Ticket: SDK-561

📖 Description

Wires consent record/read through Iterable → IterableApi → RNIterableAPI on iOS and Android (pinned SDKs 6.7.5 / 3.10.1). The getter returns Promise<boolean> like other identity getters. Before initialize resolves, the setter is a no-op and the getter resolves false so Android is not called pre-init (SDK-768). enableUnknownUserActivation remains unexposed on IterableConfig.

🧪 How to test?

  • yarn typecheck && yarn test --coverage && yarn turbo run build:android
  • After await Iterable.initialize(...), call setVisitorUsageTracked(true) and confirm getVisitorUsageTracked() resolves to true.

🧾 Changelog

Unreleased entry in CHANGELOG.md.

📹 Loom recording if applicable

N/A

🐞 Github Issues solved

N/A

📚 Docs PR if applicable

N/A

Add setVisitorUsageTracked and getVisitorUsageTracked across the TurboModule bridge.
Guard calls until initialize resolves to avoid Android pre-init crashes.
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Lines Statements Branches Functions
Coverage: 72%
72.67% (601/827) 62.04% (237/382) 68.04% (181/266)

@qltysh

qltysh Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Qlty


Coverage Impact

Unable to calculate total coverage change because base branch coverage was not found.

Modified Files with Diff Coverage (2)

RatingFile% DiffUncovered Line #s
New file Coverage rating: A
src/core/classes/IterableApi.ts100.0%
New file Coverage rating: A
src/core/classes/Iterable.ts100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Describe storage on setVisitorUsageTracked and reads on getVisitorUsageTracked.
…1-visitor-usage-tracked

Resolve CHANGELOG conflict and document UUA config parity alongside visitor consent APIs.
…vation

Consent APIs only store and return the flag; UUA also requires IterableConfig at init.
@jferrao-itrbl
jferrao-itrbl marked this pull request as ready for review October 15, 2026 09:29
@jferrao-itrbl
jferrao-itrbl requested a review from a team as a code owner October 15, 2026 09:29

@rtlsilva rtlsilva 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.

Approved with one optional, non-blocking comment. LGTM

Also enableUnknownUserActivation should already be exposed in the base branch, so I suggest updating the PR description.

Comment thread src/core/classes/Iterable.ts Outdated
Export resetSdkInitializationStateForTests from Iterable.ts for tests only
so it is not on the public Iterable static API surface.
@jferrao-itrbl
jferrao-itrbl merged commit bbf3840 into feature/SDK-548-uua-feature-parity Oct 19, 2026
11 checks passed
@jferrao-itrbl
jferrao-itrbl deleted the feature/SDK-561-visitor-usage-tracked branch October 19, 2026 19:52
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