Skip to content

Release: 2.26.2#205

Closed
uc-brunosilva wants to merge 1 commit into
masterfrom
release/2.26.2
Closed

Release: 2.26.2#205
uc-brunosilva wants to merge 1 commit into
masterfrom
release/2.26.2

Conversation

@uc-brunosilva
Copy link
Copy Markdown
Collaborator

@uc-brunosilva uc-brunosilva commented Apr 16, 2026

CodeAnt-AI Description

Release 2.26.2

What Changed

  • Updated the React Native SDK, Android package, and iOS package to version 2.26.2
  • Added release notes for 2.26.2, including Android and iOS bug fixes plus improved initialization logging
  • Included iOS support for the “More” button custom colors in the first layer

Impact

✅ Clearer release tracking
✅ Fewer banner style issues on iOS
✅ More accurate version reporting across platforms

🔄 Retrigger CodeAnt AI Review

Details

💡 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

  • New Features

    • Added customization options for "More" button colors (background and text).
  • Bug Fixes

    • Released version 2.26.2 with resolved issues across multiple platforms and configurations.

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 16, 2026

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
Copy Markdown

Review Summary by Qodo

Release version 2.26.2 with fixes and enhancements

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Release version 2.26.2 with bug fixes and improvements
• Added "More" button color customization properties
• Fixed consent banner display and persistence issues
• Improved SDK initialization logging and UI alignment
Diagram
flowchart LR
  A["Version Update<br/>2.26.1 → 2.26.2"] --> B["Bug Fixes<br/>Android/iOS/TCF"]
  A --> C["UI Enhancements<br/>More Button Colors"]
  B --> D["Release Notes<br/>& Documentation"]
  C --> D
Loading

Grey Divider

File Changes

1. android/build.gradle.kts ⚙️ Configuration changes +1/-1

Update Android SDK version number

• Updated usercentricsVersion from 2.26.1 to 2.26.2

android/build.gradle.kts


2. ios/Extensions/UsercentricsCMPData+Dict.swift ✨ Enhancement +2/-0

Add More button color customization properties

• Added moreBtnBackground property to customization color dictionary
• Added moreBtnText property to customization color dictionary
• Enables custom color configuration for "More" button in first layer

ios/Extensions/UsercentricsCMPData+Dict.swift


3. sample/ios/sampleTests/Mock/CMPData+Mock.swift 🧪 Tests +3/-1

Update mock data with More button colors

• Added moreBtnBackground mock property to CustomizationColor extension
• Added moreBtnText mock property to CustomizationColor extension
• Updated mock data to match new color customization fields

sample/ios/sampleTests/Mock/CMPData+Mock.swift


View more (2)
4. CHANGELOG.md 📝 Documentation +16/-0

Document 2.26.2 release notes and fixes

• Added comprehensive release notes for version 2.26.2
• Documented improvements including SDK initialization logging
• Listed multiple bug fixes for Android, iOS, and TCF platforms
• Fixed "More" button custom colors not being applied in first layer

CHANGELOG.md


5. package.json ⚙️ Configuration changes +2/-2

Update npm package version numbers

• Updated version field from 2.26.1 to 2.26.2
• Updated iosPackageVersion field from 2.26.1 to 2.26.2

package.json


Grey Divider

Qodo Logo

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

📝 Walkthrough

Walkthrough

A patch version release (2.26.1 → 2.26.2) with changelog documentation, dependency version bumps in Android build files, package version updates, and iOS serialization extension adding two new color fields for "more" button customization.

Changes

Cohort / File(s) Summary
Release Metadata
CHANGELOG.md, package.json, android/build-legacy.gradle, android/build.gradle.kts
Version bumped from 2.26.1 to 2.26.2 across all build and package configuration files; CHANGELOG updated with categorized improvements and fixes for this release.
iOS Color Customization
ios/Extensions/UsercentricsCMPData+Dict.swift, sample/ios/sampleTests/Mock/CMPData+Mock.swift
Added moreBtnBackground and moreBtnText fields to color serialization in the dictionary output and corresponding mock initialization.

Possibly related PRs

  • PR #200: Updates the same iOS serialization in UsercentricsCMPData+Dict.swift with toDictionary entries alongside version bumps.
  • PR #181: Modifies identical build and version metadata files (android build files and package.json).
  • PR #172: Performs matching release bumps affecting the same version variables in Android and package configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

Review effort 1/5, size:M

Suggested reviewers

  • uc-brunosouza
  • islameldesoky95

Poem

🐰 A version bump hops along the way,
From 2.26.1 to .2 today!
Colors for buttons now serialize,
Mocks and gradle harmonize,
Release notes shine—let's celebrate! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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.26.2' clearly and directly describes the primary change—a version release bump across multiple files and platforms.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/2.26.2

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.

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Apr 16, 2026

Code Review by Qodo

🐞 Bugs (2)   📘 Rule violations (0)   📎 Requirement gaps (0)
🐞\ ≡ Correctness (1) ⚙ Maintainability (1)

Grey Divider


Action required

1. iOS/Android color fields diverge 🐞
Description
iOS now includes moreBtnBackground/moreBtnText in CustomizationColor.toDictionary(), but
Android’s CustomizationColor.serialize() still omits them, so the JS payload differs by platform
and “More” button colors will be unavailable on Android.
Code

ios/Extensions/UsercentricsCMPData+Dict.swift[R292-293]

+            "moreBtnBackground" : self.moreBtnBackground as Any,
+            "moreBtnText" : self.moreBtnText as Any,
Relevance

⭐⭐⭐ High

iOS adds new keys but Android serializer still omits them; cross-platform JS payload mismatch likely
bug.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The PR adds moreBtnBackground and moreBtnText to the iOS serialization map, while the Android
serialization map for the same CustomizationColor ends at secondLayerTab and never writes the
new keys, creating a platform mismatch in the object returned to React Native.

ios/Extensions/UsercentricsCMPData+Dict.swift[270-295]
android/src/main/java/com/usercentrics/reactnative/extensions/UsercentricsCMPDataExtensions.kt[308-330]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
iOS now serializes `CustomizationColor.moreBtnBackground` and `CustomizationColor.moreBtnText` into the JS payload, but Android does not. This makes the React Native API platform-inconsistent and prevents Android apps from receiving the new “More” button color customization.

### Issue Context
The iOS side added two new keys in `CustomizationColor.toDictionary()`. Android’s corresponding `CustomizationColor.serialize()` should expose the same keys when present.

### Fix Focus Areas
- android/src/main/java/com/usercentrics/reactnative/extensions/UsercentricsCMPDataExtensions.kt[308-330]
- ios/Extensions/UsercentricsCMPData+Dict.swift[270-295]

### Expected change
Add `"moreBtnBackground"` and `"moreBtnText"` to the map returned by `CustomizationColor.serialize()` (reading from the SDK model fields), matching the iOS key names.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Customization typed incorrectly 🐞
Description
UsercentricsSettings.customization is typed as string in the TS model, but native iOS/Android
serialize it as an object/map; this prevents typed access to customization colors (including the new
moreBtn* fields) and can lead consumers to write incorrect code.
Code

ios/Extensions/UsercentricsCMPData+Dict.swift[R292-293]

+            "moreBtnBackground" : self.moreBtnBackground as Any,
+            "moreBtnText" : self.moreBtnText as Any,
Relevance

⭐⭐ Medium

TS type mismatch seems real, but fixing public types may be breaking/out-of-scope for a patch
release.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
TypeScript declares customization as a string, but iOS serializes it via
self.customization?.toDictionary() and Android via customization?.serialize(), meaning the
runtime shape is an object rather than a string.

src/models/UsercentricsSettings.tsx[5-35]
ios/Extensions/UsercentricsCMPData+Dict.swift[17-50]
android/src/main/java/com/usercentrics/reactnative/extensions/UsercentricsCMPDataExtensions.kt[37-70]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The TS model types `UsercentricsSettings.customization` as `string`, but native returns an object. This breaks type safety and blocks typed access to customization fields (including newly added `moreBtnBackground`/`moreBtnText`).

### Issue Context
Both iOS and Android serialize `customization` as a structured object containing at least `color`, `font`, and other style fields.

### Fix Focus Areas
- src/models/UsercentricsSettings.tsx[5-35]
- android/src/main/java/com/usercentrics/reactnative/extensions/UsercentricsCMPDataExtensions.kt[290-330]
- ios/Extensions/UsercentricsCMPData+Dict.swift[17-50]

### Expected change
Replace `customization?: string` with a properly typed object (e.g., `customization?: UsercentricsCustomization`) and define the nested types (e.g., `CustomizationColor` with `moreBtnBackground`/`moreBtnText`). If full typing is too large for this release, change it to `customization?: Record<string, unknown>` as an intermediate step.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@codeant-ai codeant-ai Bot added the size:XL This PR changes 500-999 lines, ignoring generated files label Apr 16, 2026
@pantoaibot
Copy link
Copy Markdown

pantoaibot Bot commented Apr 16, 2026

PR Summary:

Release 2.26.2: version bumps, changelog update, and iOS UI color serialization for the "More" button (plus test mock).

  • Changelog: added 2.26.2 release notes (logging improvements, multiple Android/iOS/TCF fixes listed).
  • Version bumps: updated usercentrics version in android/build-legacy.gradle and android/build.gradle.kts (2.26.2) and package.json (2.26.2 / iosPackageVersion 2.26.2).
  • iOS serialization: CustomizationColor.toDictionary() now includes "moreBtnBackground" and "moreBtnText".
  • Tests / samples: sample mock (CMPData+Mock.swift) updated to populate the new moreBtnBackground and moreBtnText fields.
  • No breaking API changes in diffs; mainly bug fixes and metadata/serialization additions.

Reviewed by Panto AI

Comment thread sample/ios/sampleTests/Mock/CMPData+Mock.swift
@pantoaibot
Copy link
Copy Markdown

pantoaibot Bot commented Apr 16, 2026

Reviewed up to commit:c368401c3c839cf22e9604f4ef9e58d109178340

Reviewed by Panto AI

Comment on lines +292 to +293
"moreBtnBackground" : self.moreBtnBackground as Any,
"moreBtnText" : self.moreBtnText as Any,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Ios/android color fields diverge 🐞 Bug ≡ Correctness

iOS now includes moreBtnBackground/moreBtnText in CustomizationColor.toDictionary(), but
Android’s CustomizationColor.serialize() still omits them, so the JS payload differs by platform
and “More” button colors will be unavailable on Android.
Agent Prompt
### Issue description
iOS now serializes `CustomizationColor.moreBtnBackground` and `CustomizationColor.moreBtnText` into the JS payload, but Android does not. This makes the React Native API platform-inconsistent and prevents Android apps from receiving the new “More” button color customization.

### Issue Context
The iOS side added two new keys in `CustomizationColor.toDictionary()`. Android’s corresponding `CustomizationColor.serialize()` should expose the same keys when present.

### Fix Focus Areas
- android/src/main/java/com/usercentrics/reactnative/extensions/UsercentricsCMPDataExtensions.kt[308-330]
- ios/Extensions/UsercentricsCMPData+Dict.swift[270-295]

### Expected change
Add `"moreBtnBackground"` and `"moreBtnText"` to the map returned by `CustomizationColor.serialize()` (reading from the SDK model fields), matching the iOS key names.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ios/Extensions/UsercentricsCMPData`+Dict.swift:
- Around line 292-293: The CustomizationColor.toDictionary() serializer is
missing three color keys present in the mock (tabsBorderColor, ccpaButtonColor,
ccpaButtonTextColor); update the toDictionary() implementation in the
CustomizationColor type to include these three keys (tabsBorderColor,
ccpaButtonColor, ccpaButtonTextColor) alongside the existing moreBtnBackground
and moreBtnText so the bridge contract matches the mock data (ensure you use the
same dictionary key names and map them from the corresponding CustomizationColor
properties).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b055ee86-3b35-431c-be1d-b0ca766572f3

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad792f and c368401.

⛔ 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 (6)
  • CHANGELOG.md
  • android/build-legacy.gradle
  • android/build.gradle.kts
  • ios/Extensions/UsercentricsCMPData+Dict.swift
  • package.json
  • sample/ios/sampleTests/Mock/CMPData+Mock.swift

Comment on lines +292 to +293
"moreBtnBackground" : self.moreBtnBackground as Any,
"moreBtnText" : self.moreBtnText as Any,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check field parity for CustomizationColor across Swift/TS/Kotlin surfaces
rg -n --type=swift --type=ts --type=kt \
  'moreBtnBackground|moreBtnText|tabsBorderColor|ccpaButtonColor|ccpaButtonTextColor'

Repository: Usercentrics/react-native-sdk

Length of output: 99


🏁 Script executed:

#!/bin/bash
# Search for CustomizationColor field definitions and usage
# Fix: use proper file type flags and broader search

# First, check rg supported types
echo "=== Checking available Kotlin patterns ==="
rg -n 'moreBtnBackground|moreBtnText|tabsBorderColor|ccpaButtonColor|ccpaButtonTextColor' --max-count=30

echo ""
echo "=== Locate CustomizationColor definition ==="
rg -n 'class CustomizationColor|interface CustomizationColor' --type=swift --type=ts

Repository: Usercentrics/react-native-sdk

Length of output: 903


🏁 Script executed:

#!/bin/bash
# Check the referenced mock file location and content
echo "=== Verify mock file reference ==="
find . -name "CMPData+Mock.swift" -type f

echo ""
echo "=== Read referenced lines 509-511 from mock file ==="
if [ -f "sample/ios/sampleTests/Mock/CMPData+Mock.swift" ]; then
  sed -n '500,520p' "sample/ios/sampleTests/Mock/CMPData+Mock.swift"
fi

Repository: Usercentrics/react-native-sdk

Length of output: 1145


🏁 Script executed:

#!/bin/bash
# Search for where these color fields are defined/used in native bridge
echo "=== Find all color field definitions across Swift and TypeScript ==="
rg -n -A3 -B3 'ccpaButtonColor|tabsBorderColor' --type=swift --type=ts | head -100

Repository: Usercentrics/react-native-sdk

Length of output: 999


🏁 Script executed:

#!/bin/bash
# Read the complete UsercentricsCMPData+Dict.swift file to see the full toDictionary method
wc -l ios/Extensions/UsercentricsCMPData+Dict.swift

Repository: Usercentrics/react-native-sdk

Length of output: 122


🏁 Script executed:

#!/bin/bash
# Search for CustomizationColor extension in the target file
rg -n -B5 -A30 'extension CustomizationColor' ios/Extensions/UsercentricsCMPData+Dict.swift | head -150

Repository: Usercentrics/react-native-sdk

Length of output: 1614


🏁 Script executed:

#!/bin/bash
# Get broader context around lines 292-293 to see the method structure
sed -n '250,310p' ios/Extensions/UsercentricsCMPData+Dict.swift

Repository: Usercentrics/react-native-sdk

Length of output: 2073


🏁 Script executed:

#!/bin/bash
# Find CustomizationColor class definition
rg -n -B2 -A50 'class CustomizationColor' --type=swift | head -100

Repository: Usercentrics/react-native-sdk

Length of output: 55


🏁 Script executed:

#!/bin/bash
# Search for CustomizationColor definition without restricting to "class"
rg -n 'CustomizationColor' --type=swift | grep -E '(struct|class|var|let|func).*CustomizationColor' | head -20

Repository: Usercentrics/react-native-sdk

Length of output: 168


🏁 Script executed:

#!/bin/bash
# Find where CustomizationColor is first declared/defined
rg -n '^(struct|class|protocol|typealias)\s+CustomizationColor' --type=swift

Repository: Usercentrics/react-native-sdk

Length of output: 55


🏁 Script executed:

#!/bin/bash
# List files in ios directory that might contain model definitions
find ios -name "*.swift" -type f | head -30

Repository: Usercentrics/react-native-sdk

Length of output: 1037


🏁 Script executed:

#!/bin/bash
# Search entire repo for CustomizationColor definition
rg -n '(struct|class|interface|type)\s+CustomizationColor' | head -20

Repository: Usercentrics/react-native-sdk

Length of output: 55


🏁 Script executed:

#!/bin/bash
# Also check if it's a TypeScript/JavaScript type
rg -n 'CustomizationColor\s*[:=]' --type=ts --type=js | head -20

Repository: Usercentrics/react-native-sdk

Length of output: 55


🏁 Script executed:

#!/bin/bash
# Look for import statements for CustomizationColor in the extension file
grep -n 'import\|CustomizationColor' ios/Extensions/UsercentricsCMPData+Dict.swift | head -10

Repository: Usercentrics/react-native-sdk

Length of output: 149


Add missing color fields to CustomizationColor.toDictionary().

Lines 292–293 correctly add moreBtnBackground and moreBtnText, but the serializer is missing three other color fields that appear in the mock data: tabsBorderColor, ccpaButtonColor, and ccpaButtonTextColor (see sample/ios/sampleTests/Mock/CMPData+Mock.swift lines 509–511). Ensure the bridge contract is complete and consistent between mock and implementation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ios/Extensions/UsercentricsCMPData`+Dict.swift around lines 292 - 293, The
CustomizationColor.toDictionary() serializer is missing three color keys present
in the mock (tabsBorderColor, ccpaButtonColor, ccpaButtonTextColor); update the
toDictionary() implementation in the CustomizationColor type to include these
three keys (tabsBorderColor, ccpaButtonColor, ccpaButtonTextColor) alongside the
existing moreBtnBackground and moreBtnText so the bridge contract matches the
mock data (ensure you use the same dictionary key names and map them from the
corresponding CustomizationColor properties).

"toggleDisabledBackground" : self.toggleDisabledBackground as Any,
"toggleDisabledIcon" : self.toggleDisabledIcon as Any,
"secondLayerTab" : self.secondLayerTab as Any,
"moreBtnBackground" : self.moreBtnBackground as Any,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: The new customization color mapping is incomplete: ccpaButtonTextColor is now part of CustomizationColor (also added in the updated mock), but it is not serialized in this dictionary. This causes a schema mismatch where React Native receives an incomplete color payload and cannot access that field on iOS. [logic error]

Severity Level: Major ⚠️
- ⚠️ iOS getCMPData omits CustomizationColor.ccpaButtonTextColor property.
- ⚠️ React Native apps cannot theme CCPA button text color.
- ⚠️ iOS bridge diverges from underlying Usercentrics CustomizationColor model.
- ⚠️ Tests cannot assert ccpaButtonTextColor presence in settings payload.
Suggested change
"moreBtnBackground" : self.moreBtnBackground as Any,
"ccpaButtonTextColor" : self.ccpaButtonTextColor as Any,
Steps of Reproduction ✅
1. From JavaScript, call `Usercentrics.getCMPData()` as done in
`sample/src/screens/CustomUI.tsx:5-7`, which invokes the native iOS bridge to fetch CMP
data.

2. On iOS, this calls `RNUsercentricsModule.getCMPData` at
`ios/RNUsercentricsModule.swift:18-20`, which resolves
`usercentricsManager.getCMPData().toDictionary()` and returns the resulting NSDictionary
back to JS.

3. `UsercentricsManagerImplementation.getCMPData` at
`ios/Manager/UsercentricsManager.swift:88-89` returns
`UsercentricsCore.shared.getCMPData()`, which is converted via
`UsercentricsCMPData.toDictionary()` in
`ios/Extensions/UsercentricsCMPData+Dict.swift:4-13`. That method includes `"settings":
self.settings.toDictionary()`, where `UsercentricsSettings.toDictionary()` at
`ios/Extensions/UsercentricsCMPData+Dict.swift:17-51` serializes `"customization" :
self.customization?.toDictionary() as Any`.

4. `UsercentricsCustomization.toDictionary()` at
`ios/Extensions/UsercentricsCMPData+Dict.swift:243-252` serializes `"color" :
self.color?.toDictionary() as Any`, which calls `CustomizationColor.toDictionary()`
defined at `ios/Extensions/UsercentricsCMPData+Dict.swift:271-45`. This mapping includes
keys like `"primary"`, `"secondLayerTab"`, `"moreBtnBackground"`, and `"moreBtnText"`
(lines 273-44) but does not serialize any `"ccpaButtonTextColor"` key. However, the
`CustomizationColor` type in the SDK clearly has a `ccpaButtonTextColor` property, as
shown by the mock initializer in `sample/ios/sampleTests/Mock/CMPData+Mock.swift:58-67`
and `80-83`, where `CustomizationColor.mock()` sets `ccpaButtonTextColor:
"ccpaButtonTextColor"`. Because `CustomizationColor.toDictionary()` never includes this
field, the NSDictionary returned by `getCMPData()` to JavaScript lacks
`settings.customization.color.ccpaButtonTextColor`, so any React Native code attempting to
read `data.settings.customization.color.ccpaButtonTextColor` will always get `undefined`
despite the native SDK providing a value.
Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** ios/Extensions/UsercentricsCMPData+Dict.swift
**Line:** 292:292
**Comment:**
	*Logic Error: The new customization color mapping is incomplete: `ccpaButtonTextColor` is now part of `CustomizationColor` (also added in the updated mock), but it is not serialized in this dictionary. This causes a schema mismatch where React Native receives an incomplete color payload and cannot access that field on iOS.

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.
👍 | 👎

Comment on lines +292 to +293
"moreBtnBackground" : self.moreBtnBackground as Any,
"moreBtnText" : self.moreBtnText as Any,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 Architect Review — HIGH

The new "More" button color fields (moreBtnBackground, moreBtnText) are only exposed in the iOS CMP data serialization, while the Android serializer (CustomizationColor.serialize in UsercentricsCMPDataExtensions.kt) still stops at secondLayerTab, breaking the otherwise platform-symmetric getCMPData contract for custom UI colors.

Suggestion: Update the Android CustomizationColor.serialize() implementation to include moreBtnBackground and moreBtnText (mirroring the iOS CustomizationColor.toDictionary()), so getCMPData returns a consistent customization color payload on both platforms.

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

**Path:** ios/Extensions/UsercentricsCMPData+Dict.swift
**Line:** 292:293
**Comment:**
	*HIGH: The new "More" button color fields (`moreBtnBackground`, `moreBtnText`) are only exposed in the iOS CMP data serialization, while the Android serializer (`CustomizationColor.serialize` in UsercentricsCMPDataExtensions.kt) still stops at `secondLayerTab`, breaking the otherwise platform-symmetric `getCMPData` contract for custom UI colors.

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
Copy Markdown

codeant-ai Bot commented Apr 16, 2026

CodeAnt AI finished reviewing your PR.

@uc-brunosilva uc-brunosilva deleted the release/2.26.2 branch April 16, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants