Skip to content

Conversation

@uc-brunosilva
Copy link
Collaborator

@uc-brunosilva uc-brunosilva commented Dec 5, 2025

User description

PR Type

Other


Description

  • Bump version from 2.24.1 to 2.24.2

  • Update changelog with 2.24.2 release notes

  • Fix React Native issues in new release


Diagram Walkthrough

flowchart LR
  A["Version 2.24.1"] -- "Release 2.24.2" --> B["Version 2.24.2"]
  B -- "Update build config" --> C["android/build.gradle.kts"]
  B -- "Update package metadata" --> D["package.json"]
  B -- "Document changes" --> E["CHANGELOG.md"]
Loading

File Walkthrough

Relevant files
Configuration changes
build.gradle.kts
Update Android build version to 2.24.2                                     

android/build.gradle.kts

  • Updated usercentricsVersion from 2.24.1 to 2.24.2
+1/-1     
package.json
Update package version to 2.24.2                                                 

package.json

  • Updated version field from 2.24.1 to 2.24.2
  • Updated iosPackageVersion field from 2.24.1 to 2.24.2
+2/-2     
Documentation
CHANGELOG.md
Add 2.24.2 release notes to changelog                                       

CHANGELOG.md

  • Added new 2.24.2 release entry dated Dec 5, 2025
  • Documented fix for React Native issues
  • Reorganized changelog entries with 2.24.2 at top
+7/-3     


CodeAnt-AI Description

Release 2.24.2: Fix React Native issues and update package versions

What Changed

  • Package version bumped to 2.24.2 (package.json and iOS package metadata) so installs reference the new release
  • Android build metadata updated to 2.24.2 so Android artifacts reflect the release
  • CHANGELOG updated with a 2.24.2 entry that notes fixes for React Native issues

Impact

✅ Fewer React Native integration issues
✅ Correct package version on install
✅ Clearer release notes for 2.24.2

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Bug Fixes

    • Fixes for React Native integration addressing runtime issues.
  • Chores

    • Package versions bumped to 2.24.2 across platforms and metadata.
  • Documentation

    • Changelog updated with a new 2.24.2 entry; prior entries reordered and retained.
  • Breaking Changes

    • Public API: denyAllForTCF now accepts an additional unsavedPurposeLIDecisions parameter (callers may need to provide or default an empty list).

✏️ Tip: You can customize this high-level summary in your review settings.

@codeant-ai
Copy link

codeant-ai bot commented Dec 5, 2025

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@qodo-code-review
Copy link

qodo-code-review bot commented Dec 5, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@codeant-ai codeant-ai bot added the size:XL This PR changes 500-999 lines, ignoring generated files label Dec 5, 2025
@qodo-code-review
Copy link

qodo-code-review bot commented Dec 5, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Make changelog entry more descriptive

Make the changelog entry ' Fix react native issues' more descriptive by
specifying which issues were fixed, possibly with links to issue numbers.
*

CHANGELOG.md [5]

-* Fix react native issues
+* Fix a crash on Android when using React Native's Fabric renderer (see #issue-number).
+* Fix an issue where the CMP banner was not displayed correctly on certain iOS devices.
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies that the changelog entry is too vague, which negatively impacts developers who need to understand the specific changes in a new version.

Low
  • Update

@pantoaibot
Copy link

pantoaibot bot commented Dec 5, 2025

PR Summary:

Release: Bump to 2.24.2 — updates changelog and version metadata to publish a patch that "Fix[es] react native issues".

Changes:

  • CHANGELOG.md: Added 2.24.2 entry ("Fix react native issues") and reordered/cleaned recent release notes.
  • android/build-legacy.gradle: usercentrics_version updated 2.24.1 → 2.24.2.
  • android/build.gradle.kts: usercentricsVersion updated 2.24.1 → 2.24.2.
  • package.json: package version and iosPackageVersion updated 2.24.1 → 2.24.2.

Notes:

  • No substantive code or dependency updates beyond metadata/version bumps and changelog text in this PR.
  • No breaking changes detected.

Reviewed by Panto AI

@codeant-ai
Copy link

codeant-ai bot commented Dec 5, 2025

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Release Consistency
    Only a single-line version bump is present in this diff. Ensure the version change is propagated to all relevant places (publishing metadata, changelog, package manifests, CI/release scripts). Verify automated release/publishing steps use this value and that artifacts will be published with the intended version.

  • Hardcoded Version
    The usercentrics version is hardcoded in this module. Hardcoding a release/version string in a single module increases the risk of inconsistent versions across modules, CI pipelines, and other build files (e.g., root build files, gradle.properties, or other platform manifests). Consider centralizing the version so all consumers read the same source of truth.

@@ -1,4 +1,4 @@
val usercentricsVersion = "2.24.1"
val usercentricsVersion = "2.24.2"
Copy link

Choose a reason for hiding this comment

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

Suggestion: Hardcoded dependency version: embedding "2.24.2" directly in the script makes it harder to override or keep consistent across modules and CI; prefer reading the version from a project property (with a fallback) so callers can override it without editing the file. [configuration]

Severity Level: Minor ⚠️

Suggested change
val usercentricsVersion = "2.24.2"
val usercentricsVersion: String = (project.findProperty("usercentricsVersion") as String?) ?: "2.24.2"
Why it matters? ⭐

The suggestion addresses a real, practical configuration shortcoming: embedding the dependency version directly in the Kotlin DSL makes it harder to override from CI or other modules and to keep versions consistent across a multi-module build. Replacing the literal with a project property fallback is a low-risk, high-value improvement that enables -P overrides (or a central versions catalog) without changing runtime behaviour when no override is provided.

Note: the proposed cast in the improved_code (project.findProperty("usercentricsVersion") as String?) can be brittle if the property isn't a String; prefer project.findProperty("usercentricsVersion")?.toString() ?: "2.24.2" for a safer conversion.

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** android/build.gradle.kts
**Line:** 1:1
**Comment:**
	*Configuration: Hardcoded dependency version: embedding "2.24.2" directly in the script makes it harder to override or keep consistent across modules and CI; prefer reading the version from a project property (with a fallback) so callers can override it without editing the file.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.

@codeant-ai
Copy link

codeant-ai bot commented Dec 5, 2025

CodeAnt AI finished reviewing your PR.

Comment on lines 3 to 14
### 2.24.2Dec 5, 2025
## Improvement
* Fix react native issues

### 2.24.1 – Oct 31, 2025
## Improvement
* TCF 2.3 Support: Support the latest Transparency & Consent Framework 2.3.
* TCF 2.3 Support: fixes about tcString
* Special Features Section: Added support for the new Special Features/Purposes section.
* Fix issue where the SDK failed to initialize offline.

### 2.24.0 – Oct 31, 2025
Copy link

Choose a reason for hiding this comment

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

[NITPICK] The changelog now contains a new 2.24.2 entry (lines starting at 3) but also re-inserts a 2.24.0 block later (lines starting at 14), which creates a duplicate and breaks chronological ordering. Actionable steps: remove the duplicated 2.24.0 block (or merge any unique notes from it), ensure releases are ordered newest-to-oldest, and replace vague entry text like "Fix react native issues" with a short, specific summary or link to the PR/issue (e.g. "Fixed Android X behavior in X component — closes #1234").

[Release Notes](https://docs.usercentrics.com/cmp_in_app_sdk/latest/about/history/)

### 2.24.2 – Dec 5, 2025
## Improvement
* Fixed React Native integration issues when using Fabric renderer and RN >= 0.79.6.

### 2.24.1 – Oct 31, 2025
## Improvement
* TCF 2.3 Support: Support the latest Transparency & Consent Framework 2.3.
* TCF 2.3 Support: fixes about tcString
* Special Features Section: Added support for the new Special Features/Purposes section.
* Fix issue where the SDK failed to initialize offline.

### 2.24.0 – Oct 31, 2025
## React Native
* Added Fabric renderer compatibility

Comment on lines +3 to +10
"version": "2.24.2",
"description": "Usercentrics SDK",
"homepage": "https://usercentrics.com",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"author": "Usercentrics <[email protected]>",
"iosPackageName": "react-native-usercentrics",
"iosPackageVersion": "2.24.1",
"iosPackageVersion": "2.24.2",
Copy link

Choose a reason for hiding this comment

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

[VALIDATION] You bumped "version" and "iosPackageVersion" — please validate the full release flow: 1) Ensure package artifacts (compiled lib/, types) are rebuilt (yarn compile / tsc) and included in the release. 2) Run podspec validation (pod spec lint or equivalent) since react-native-usercentrics.podspec uses package['iosPackageVersion'] (see reference podspec). 3) Update any lockfiles (yarn.lock / package-lock.json) and CI/release tags to reflect the new version. This prevents mismatched published artifacts between npm and CocoaPods.

@pantoaibot
Copy link

pantoaibot bot commented Dec 5, 2025

Reviewed up to commit:07ad374ba62937995876f2e4bd6a80d990cd75b2

Additional Suggestion
Others - Multiple build files contain hard-coded Usercentrics SDK version strings (android/build-legacy.gradle line 1 and android/build.gradle.kts line 1). Maintain a single source of truth to avoid drift between package.json, legacy Gradle, and Kotlin DSL: - Option A: put usercentrics version in gradle.properties or rootProject.ext and read it from both build scripts. - Option B: derive Android module versions from package.json via a small release script that updates Gradle files (and commits the change) as part of your release pipeline. - For Kotlin DSL, prefer using project.findProperty("usercentricsVersion") or an extra property rather than duplicating literals. This reduces risk of inconsistent versions across artifacts.
// android/build.gradle.kts
// gradle.properties
//   usercentricsVersion=2.24.2

// android/build.gradle.kts
val usercentricsVersion: String by project

// android/build-legacy.gradle
// gradle.properties
//   usercentrics_version=2.24.2

def usercentrics_version = project.hasProperty("usercentrics_version") ? project.getProperty("usercentrics_version") : "2.24.2"
version usercentrics_version

// package.json (source of truth)
// Drive gradle.properties updates via a release script, e.g. scripts/bump-version.js,
// that reads package.json.version and rewrites gradle.properties before tagging a release.

Reviewed by Panto AI

@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

Warning

Rate limit exceeded

@uc-brunosilva has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 41 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between cd49c7f and b56da33.

📒 Files selected for processing (17)
  • android/src/androidTest/java/com/usercentrics/reactnative/RNUsercentricsModuleTest.kt (2 hunks)
  • android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1 hunks)
  • android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt (1 hunks)
  • android/src/main/java/com/usercentrics/reactnative/extensions/UserDecisionExtensions.kt (1 hunks)
  • example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (1 hunks)
  • example/ios/exampleTests/Mock/CMPData+Mock.swift (1 hunks)
  • example/ios/exampleTests/RNUsercentricsModuleTests.swift (2 hunks)
  • ios/Manager/UsercentricsManager.swift (2 hunks)
  • ios/RNUsercentricsModule.mm (1 hunks)
  • ios/RNUsercentricsModule.swift (1 hunks)
  • ios/RNUsercentricsModuleSpec.h (1 hunks)
  • sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (1 hunks)
  • sample/ios/sampleTests/Mock/CMPData+Mock.swift (1 hunks)
  • sample/ios/sampleTests/RNUsercentricsModuleTests.swift (2 hunks)
  • src/NativeUsercentrics.ts (2 hunks)
  • src/Usercentrics.tsx (2 hunks)
  • src/fabric/NativeUsercentricsModule.ts (1 hunks)

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds an optional unsavedPurposeLIDecisions parameter to denyAllForTCF across JS, Fabric, Android and iOS native modules and tests; forwards the new data through bridges into core SDK calls; bumps package and native dependency versions to 2.24.2 and updates CHANGELOG ordering.

Changes

Cohort / File(s) Summary
Changelog & Package Metadata
CHANGELOG.md, package.json
Inserted 2.24.2 entry and reordered entries; bumped version and iosPackageVersion from 2.24.12.24.2.
Android Build Files
android/build-legacy.gradle, android/build.gradle.kts
Updated usercentrics_version / usercentricsVersion from 2.24.12.24.2.
JS Public API & Module Spec
src/NativeUsercentrics.ts, src/Usercentrics.tsx, src/fabric/NativeUsercentricsModule.ts
Added TCFUserDecisionOnPurpose import/type; extended denyAllForTCF signature to accept unsavedPurposeLIDecisions (default [] in JS) and forward it to native.
Android RN Module & Extensions
android/src/main/java/.../RNUsercentricsModule.kt, android/src/main/java/.../RNUsercentricsModuleSpec.kt, android/src/main/java/.../extensions/UserDecisionExtensions.kt
RN method signature now accepts unsavedPurposeLIDecisions: ReadableArray; added ReadableArray.deserializeTCFUserDecisionOnPurposeList() to map items to internal model and pass to SDK.
Android Tests
android/src/androidTest/java/com/usercentrics/reactnative/RNUsercentricsModuleTest.kt
Updated mocks/verifications to expect the extra emptyList() argument for denyAllForTCF.
iOS Native Bridge & Spec
ios/RNUsercentricsModule.mm, ios/RNUsercentricsModule.swift, ios/RNUsercentricsModuleSpec.h
Extended exported/bridged denyAllForTCF to accept unsavedPurposeLIDecisions (NSArray / [NSDictionary]) and convert/pass decisions to manager.
iOS Manager & Core Calls
ios/Manager/UsercentricsManager.swift
Updated protocol and implementation to accept unsavedPurposeLIDecisions: [KotlinInt: KotlinBoolean]? and forward it to UsercentricsCore.shared.denyAllForTCF(...).
iOS & Sample Test Fakes / Tests
example/ios/.../FakeUsercentricsManager.swift, sample/ios/.../FakeUsercentricsManager.swift, example/ios/.../RNUsercentricsModuleTests.swift, sample/ios/.../RNUsercentricsModuleTests.swift
Added property to store received unsavedPurposeLIDecisions; updated denyAllForTCF signatures and tests to pass [].

Sequence Diagram(s)

sequenceDiagram
  participant AppJS as App (JS)
  participant Fabric as Fabric / TurboModule
  participant RN as RN Bridge (Kotlin/ObjC++)
  participant Native as Native Manager (iOS/Android)
  participant Core as UsercentricsCore

  AppJS->>Fabric: denyAllForTCF(fromLayer, consentType, unsavedPurposeLIDecisions)
  Fabric->>RN: call denyAllForTCF with decisions array
  RN->>Native: denyAllForTCF(fromLayer, consentType, decisions)
  Native->>Core: denyAllForTCF(fromLayer:, consentType:, unsavedPurposeLIDecisions:)
  Core-->>Native: [UsercentricsServiceConsent] result
  Native-->>RN: serialized result
  RN-->>Fabric: promise resolved
  Fabric-->>AppJS: Promise resolves with service list
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas needing extra attention:
    • Cross-language typing/serialization of TCFUserDecisionOnPurpose (JS ↔ Fabric ↔ ReadableArray/NSArray ↔ Kotlin map).
    • Consistency of bridging signatures across .ts/.tsx, Fabric spec, Kotlin, Swift, and Objective-C++ (.mm).
    • Nullability and empty-array handling when converting to/from KotlinInt→KotlinBoolean maps.
    • Tests and fake managers storing and asserting the new parameter.

Possibly related PRs

Suggested labels

size:M

Suggested reviewers

  • uc-brunosouza
  • souzabrunoj

Poem

🐇 I hop through code with carrot bright,
A tiny list now joins the fight.
Bridges stretched from JS to core,
Tests nod, versions bump once more.
Hooray — I thumped my paw in delight!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Release: 2.24.2' clearly identifies the main change—a version bump to 2.24.2—which aligns with the PR's primary objective of releasing version 2.24.2 as documented in the changelog, version files, and build configurations.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
CHANGELOG.md (1)

3-5: Clarify 2.24.2 changelog wording

The new entry is quite vague and uses inconsistent capitalization (“react native”). Consider a slightly more descriptive line and proper casing, e.g.:

-## Improvement
-* Fix react native issues
+## Improvement
+* Fixed React Native integration issues (see PR #177 for details)

This makes the impact clearer for consumers scanning the changelog.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 07ad374 and 8323d0e.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • sample/ios/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • CHANGELOG.md (2 hunks)
  • android/build-legacy.gradle (1 hunks)
  • android/build.gradle.kts (1 hunks)
  • android/src/androidTest/java/com/usercentrics/reactnative/RNUsercentricsModuleTest.kt (2 hunks)
  • android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1 hunks)
  • ios/Manager/UsercentricsManager.swift (1 hunks)
  • package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • android/build.gradle.kts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test-ios
  • GitHub Check: test-android
🔇 Additional comments (6)
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1)

152-156: Android denyAllForTCF: third argument wiring looks correct

Passing emptyList() into denyAllForTCF matches the updated Core API and stays consistent with the iOS bridge (which passes []). No issues from a type or behavior perspective.

ios/Manager/UsercentricsManager.swift (1)

115-117: iOS denyAllForTCF: added unsavedPurposeLIDecisions is consistent

Forwarding unsavedPurposeLIDecisions: [] keeps the public API stable while matching the new Core signature and Android behavior. Looks good.

CHANGELOG.md (1)

14-16: 2.24.0 React Native note and ordering look good

The 2.24.0 React Native entry now sits correctly after 2.24.1 and before 2.23.x, and the brief description is consistent with surrounding entries.

android/build-legacy.gradle (1)

1-1: Legacy Android usercentrics_version bump is consistent

Updating usercentrics_version to "2.24.2" is in line with the rest of the release metadata; no issues.

android/src/androidTest/java/com/usercentrics/reactnative/RNUsercentricsModuleTest.kt (1)

518-535: Android testDenyAllForTCF correctly aligned with 3‑arg API

The mock setup and verify now expect denyAllForTCF(TCFDecisionUILayer.FIRST_LAYER, UsercentricsConsentType.EXPLICIT, emptyList()), which matches the updated module implementation and new SDK signature. Looks solid.

package.json (1)

3-10: JS package and iOS pod version bump are consistent

version and iosPackageVersion are both set to 2.24.2, matching the native build files and changelog entries. No further changes needed here.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (1)

137-143: LGTM! Implementation matches the example test fake.

The changes correctly mirror those in example/ios/exampleTests/Fake/FakeUsercentricsManager.swift. Both fakes now properly capture the unsavedPurposeLIDecisions parameter for test assertions.

Optional: Consider reducing duplication between test fakes.

The FakeUsercentricsManager implementations in example/ios/exampleTests/Fake/ and sample/ios/sampleTests/Fake/ are nearly identical. While common in SDK projects with separate example/sample apps, extracting the shared fake to a common test utilities module could reduce maintenance burden.

example/ios/exampleTests/RNUsercentricsModuleTests.swift (1)

319-342: Consider adding assertions for the new unsavedPurposeLIDecisions parameter.

The test passes an empty array for unsavedPurposeLIDecisions, but there's no assertion verifying it was correctly passed to FakeUsercentricsManager. Based on the relevant snippet from FakeUsercentricsManager.swift, the fake stores denyAllForTCFUnsavedPurposeLIDecisions.

Consider adding:

XCTAssertEqual([], self.fakeUsercentrics.denyAllForTCFUnsavedPurposeLIDecisions)

Additionally, consider adding a test case with non-empty unsavedPurposeLIDecisions to verify the parameter is correctly serialized and passed through the native bridge.

sample/ios/sampleTests/RNUsercentricsModuleTests.swift (1)

320-353: Same test coverage gap as in example tests.

Similar to the example tests, consider adding assertions to verify unsavedPurposeLIDecisions is correctly passed through, and add a test case with non-empty data to ensure proper serialization across the bridge.

android/src/main/java/com/usercentrics/reactnative/extensions/UserDecisionExtensions.kt (1)

28-34: LGTM! Consider reducing code duplication.

The new extension function is correctly implemented and follows the existing patterns.

Note: There's an opportunity to reduce duplication by reusing this function in deserializeTCFUserDecisions() (lines 37-43), which has identical logic for the "purposes" array:

 internal fun ReadableMap.deserializeTCFUserDecisions(): TCFUserDecisions {
-    val purposes = getArray("purposes")?.let { purpose ->
-        val list = mutableListOf<TCFUserDecisionOnPurpose>()
-        for (i in 0 until purpose.size()) {
-            purpose.getMap(i)?.let { map -> list.add(map.deserializeTCFUserDecisionOnPurpose()) }
-        }
-        list
-    }
+    val purposes = getArray("purposes")?.deserializeTCFUserDecisionOnPurposeList()
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8323d0e and c0adda3.

📒 Files selected for processing (14)
  • android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1 hunks)
  • android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt (1 hunks)
  • android/src/main/java/com/usercentrics/reactnative/extensions/UserDecisionExtensions.kt (1 hunks)
  • example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (1 hunks)
  • example/ios/exampleTests/RNUsercentricsModuleTests.swift (2 hunks)
  • ios/Manager/UsercentricsManager.swift (2 hunks)
  • ios/RNUsercentricsModule.mm (1 hunks)
  • ios/RNUsercentricsModule.swift (1 hunks)
  • ios/RNUsercentricsModuleSpec.h (1 hunks)
  • sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (1 hunks)
  • sample/ios/sampleTests/RNUsercentricsModuleTests.swift (2 hunks)
  • src/NativeUsercentrics.ts (2 hunks)
  • src/Usercentrics.tsx (2 hunks)
  • src/fabric/NativeUsercentricsModule.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • ios/Manager/UsercentricsManager.swift
🧰 Additional context used
🧬 Code graph analysis (7)
src/Usercentrics.tsx (2)
src/models/TCFUserDecisions.tsx (1)
  • TCFUserDecisionOnPurpose (26-38)
src/models/UsercentricsServiceConsent.tsx (1)
  • UsercentricsServiceConsent (3-24)
src/NativeUsercentrics.ts (1)
src/models/TCFUserDecisions.tsx (1)
  • TCFUserDecisionOnPurpose (26-38)
ios/RNUsercentricsModule.swift (2)
src/models/TCFUserDecisions.tsx (1)
  • TCFUserDecisionOnPurpose (26-38)
ios/Manager/UsercentricsManager.swift (1)
  • denyAllForTCF (115-117)
example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (5)
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1)
  • denyAllForTCF (151-158)
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt (1)
  • denyAllForTCF (75-76)
ios/Manager/UsercentricsManager.swift (1)
  • denyAllForTCF (115-117)
ios/RNUsercentricsModule.swift (1)
  • denyAllForTCF (158-166)
sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (1)
  • denyAllForTCF (139-144)
example/ios/exampleTests/RNUsercentricsModuleTests.swift (4)
example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (1)
  • denyAllForTCF (138-143)
ios/Manager/UsercentricsManager.swift (1)
  • denyAllForTCF (115-117)
ios/RNUsercentricsModule.swift (1)
  • denyAllForTCF (158-166)
sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (1)
  • denyAllForTCF (139-144)
sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (3)
example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (1)
  • denyAllForTCF (138-143)
ios/Manager/UsercentricsManager.swift (1)
  • denyAllForTCF (115-117)
ios/RNUsercentricsModule.swift (1)
  • denyAllForTCF (158-166)
sample/ios/sampleTests/RNUsercentricsModuleTests.swift (4)
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1)
  • denyAllForTCF (151-158)
ios/Manager/UsercentricsManager.swift (1)
  • denyAllForTCF (115-117)
ios/RNUsercentricsModule.swift (1)
  • denyAllForTCF (158-166)
sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (1)
  • denyAllForTCF (139-144)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test-android
  • GitHub Check: test-ios
🔇 Additional comments (9)
example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (1)

136-143: LGTM! Test fake correctly updated to capture new parameter.

The addition of denyAllForTCFUnsavedPurposeLIDecisions property and the updated method signature properly mirror the real implementation in ios/Manager/UsercentricsManager.swift. The fake appropriately stores all parameters for test verification.

android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt (1)

75-76: LGTM!

The spec correctly defines the new unsavedPurposeLIDecisions parameter as ReadableArray, consistent with the implementation in RNUsercentricsModule.kt.

android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1)

151-158: LGTM!

The implementation correctly integrates the new unsavedPurposeLIDecisions parameter and uses the appropriate deserialization extension. The pattern is consistent with other TCF methods in this module.

src/Usercentrics.tsx (1)

109-112: LGTM!

The API extension is well-designed:

  • Default value [] maintains backward compatibility
  • Type is correctly imported and used
  • Parameter is properly forwarded to the native module
ios/RNUsercentricsModuleSpec.h (1)

75-79: LGTM!

The Objective-C spec correctly declares the new parameter with appropriate bridging type NSArray<NSDictionary *> *, consistent with the Swift implementation.

src/NativeUsercentrics.ts (1)

49-49: LGTM!

The TurboModule spec correctly declares unsavedPurposeLIDecisions as required. The optional behavior with default value is appropriately handled at the Usercentrics.tsx wrapper layer, keeping the native interface explicit.

ios/RNUsercentricsModule.mm (1)

72-76: Objective-C bridge correctly updated.

The bridge declaration properly adds the unsavedPurposeLIDecisions:(NSArray)unsavedPurposeLIDecisions parameter, matching the Swift implementation signature. The parameter positioning and type are correct.

src/fabric/NativeUsercentricsModule.ts (1)

36-36: Fix type safety inconsistency in the Fabric module interface.

The unsavedPurposeLIDecisions parameter is already optional with a default value ([]) in the main wrapper (src/Usercentrics.tsx), so this is not a breaking change. However, the Fabric module interface should use the correct specific type instead of generic Object.

Update src/fabric/NativeUsercentricsModule.ts to match the actual implementation:

+import { TCFUserDecisionOnPurpose } from '../models/TCFUserDecisions';
+
 export interface Spec extends TurboModule {
   // ...
-  denyAllForTCF(fromLayer: number, consentType: number, unsavedPurposeLIDecisions: Array<Object>): Promise<Array<Object>>;
+  denyAllForTCF(fromLayer: number, consentType: number, unsavedPurposeLIDecisions?: Array<TCFUserDecisionOnPurpose>): Promise<Array<Object>>;

This aligns the interface with src/NativeUsercentrics.ts (which already uses the correct type) and the wrapper implementation in src/Usercentrics.tsx.

Likely an incorrect or invalid review comment.

ios/RNUsercentricsModule.swift (1)

158-166: Implementation is correct with no breaking change.

The parameter unsavedPurposeLIDecisions has a default value of empty array in the public API (src/Usercentrics.tsx), making it optional. Existing code calling denyAllForTCF without this parameter will continue to work. The Swift implementation correctly accepts [NSDictionary], converts to TCFUserDecisionOnPurpose instances, and passes them to the manager—following the same pattern as saveDecisionsForTCF. Test coverage exists and verifies parameter passing through the fake manager.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
src/fabric/NativeUsercentricsModule.ts (1)

36-36: Signature extension looks consistent; consider whether the new param should be optional/typed more specifically

The added unsavedPurposeLIDecisions: Array<Object> matches the loose typing used elsewhere and keeps the TurboModule surface consistent. If callers are expected to omit this argument in some flows (e.g., no pending LI decisions) or for backward compatibility with existing JS wrappers, you might want to declare it as optional and/or with a more specific element type used at higher levels (e.g., TCFUserDecisionOnPurpose[]) so the contract is clearer.

example/ios/exampleTests/RNUsercentricsModuleTests.swift (1)

319-342: Tests updated correctly for the new API.

The test calls now include the unsavedPurposeLIDecisions: [] parameter. Consider adding test cases with non-empty decision arrays in a follow-up to verify the parameter is correctly captured by the fake manager.

ios/RNUsercentricsModule.swift (1)

163-163: Minor: Redundant nil initialization.

Per SwiftLint, initializing an optional variable with nil is redundant.

-        var decisions: [KotlinInt: KotlinBoolean]? = nil
+        var decisions: [KotlinInt: KotlinBoolean]?
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c0adda3 and cd49c7f.

📒 Files selected for processing (14)
  • android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1 hunks)
  • android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt (1 hunks)
  • android/src/main/java/com/usercentrics/reactnative/extensions/UserDecisionExtensions.kt (1 hunks)
  • example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (1 hunks)
  • example/ios/exampleTests/RNUsercentricsModuleTests.swift (2 hunks)
  • ios/Manager/UsercentricsManager.swift (2 hunks)
  • ios/RNUsercentricsModule.mm (1 hunks)
  • ios/RNUsercentricsModule.swift (1 hunks)
  • ios/RNUsercentricsModuleSpec.h (1 hunks)
  • sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (1 hunks)
  • sample/ios/sampleTests/RNUsercentricsModuleTests.swift (2 hunks)
  • src/NativeUsercentrics.ts (2 hunks)
  • src/Usercentrics.tsx (2 hunks)
  • src/fabric/NativeUsercentricsModule.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/NativeUsercentrics.ts
  • android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt
  • sample/ios/sampleTests/RNUsercentricsModuleTests.swift
  • src/Usercentrics.tsx
  • android/src/main/java/com/usercentrics/reactnative/extensions/UserDecisionExtensions.kt
🧰 Additional context used
🧬 Code graph analysis (3)
sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (5)
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1)
  • denyAllForTCF (151-158)
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt (1)
  • denyAllForTCF (75-76)
example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (1)
  • denyAllForTCF (138-143)
ios/Manager/UsercentricsManager.swift (1)
  • denyAllForTCF (115-117)
ios/RNUsercentricsModule.swift (1)
  • denyAllForTCF (158-175)
ios/RNUsercentricsModule.swift (2)
example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (1)
  • denyAllForTCF (138-143)
ios/Manager/UsercentricsManager.swift (1)
  • denyAllForTCF (115-117)
ios/Manager/UsercentricsManager.swift (5)
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1)
  • denyAllForTCF (151-158)
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt (1)
  • denyAllForTCF (75-76)
example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (1)
  • denyAllForTCF (138-143)
ios/RNUsercentricsModule.swift (1)
  • denyAllForTCF (158-175)
sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (1)
  • denyAllForTCF (139-144)
🪛 SwiftLint (0.57.0)
ios/RNUsercentricsModule.swift

[Warning] 163-163: Initializing an optional variable with nil is redundant

(redundant_optional_initialization)


[Warning] 162-162: Returning Void in a function declaration is redundant

(redundant_void_return)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test-ios
  • GitHub Check: test-android
🔇 Additional comments (9)
example/ios/exampleTests/Fake/FakeUsercentricsManager.swift (1)

136-143: LGTM!

The fake manager correctly adds the new denyAllForTCFUnsavedPurposeLIDecisions property and updates the denyAllForTCF signature to match the protocol. The implementation follows the existing pattern of storing parameters for test assertions.

sample/ios/sampleTests/Fake/FakeUsercentricsManager.swift (1)

137-144: LGTM!

Consistent with the example fake implementation. The property and method signature updates align with the protocol changes.

ios/RNUsercentricsModuleSpec.h (1)

75-79: LGTM!

The protocol method signature correctly adds the unsavedPurposeLIDecisions parameter, aligning with the Swift implementation and the cross-platform API expansion.

ios/Manager/UsercentricsManager.swift (2)

31-31: LGTM!

Protocol method signature correctly updated with the new optional parameter.


115-117: LGTM!

Implementation correctly forwards the unsavedPurposeLIDecisions parameter to UsercentricsCore.shared.denyAllForTCF.

example/ios/exampleTests/RNUsercentricsModuleTests.swift (1)

344-352: LGTM!

Second layer test also correctly updated with the new parameter.

android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt (1)

151-158: LGTM!

The Android implementation correctly adds the unsavedPurposeLIDecisions parameter and uses the deserializeTCFUserDecisionOnPurposeList() extension to convert the ReadableArray to the expected SDK type.

ios/RNUsercentricsModule.mm (1)

72-76: LGTM!

The Objective-C bridge method correctly exports the updated denyAllForTCF signature with the new unsavedPurposeLIDecisions parameter.

ios/RNUsercentricsModule.swift (1)

158-175: Implementation correctly parses the new parameter.

The logic properly handles the conversion from [NSDictionary] to [KotlinInt: KotlinBoolean]?, leaving decisions as nil when the input array is empty and silently skipping malformed entries.

@uc-brunosilva uc-brunosilva merged commit c7aa679 into master Dec 5, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review effort 1/5 size:XL This PR changes 500-999 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants