feat: Braze SDK integration [GE-107] cp-7.72.0#27881
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
1311099 to
a258957
Compare
gantunesr
left a comment
There was a problem hiding this comment.
Looks good fro Accounts files. Will approve once it's approved by the author's team
|
Thanks for looking @gantunesr. We actually need a pass from someone on mobile platform, since the Engagement team does not have another mobile engineer to validate. |
There was a problem hiding this comment.
How's the app performance with the introduction of this SDK, more specifically the app start times?
I'm looking for these specific measurements to assess the impact:
- First app cold start. Measure the time it takes to show the onboarding screen.
- Cold start after wallet import / creation. Measure the time it takes to land on the lockscreen after killing the app.
- Warm starts. Measure the time it takes to show the app lockscreen after a couple of minutes with the app in the background & the phone with the screen off.
Keep in mind that both platforms need to be tested and that simulators are not accurate when measuring app performance.
Also left two non-blocking comment / questions.
7554e82
c523d0e to
71df478
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tags NOT selected:
Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |
There was a problem hiding this comment.
my performance tests didn't reveal any impact on performance when testing on real Android and iOS devices. For example on Android:
Braze Build (#4421):
* Fresh install until onboarding screen: 4.883s, 4.919s, 5.333s * Cold start until lock screen : 2.758s * Warm start until password request: almost instant (can't measure)RC build (#4415):
* Fresh install until onboarding screen: 5.156s, 4.812s, 5.260s * Cold start until lock screen : 2.981s * Warm start until password request: almost instant (can't measure)The Braze SDK does everything in the background, and isn't doing much for now. There's no UI rendering, nor any UI package installed.
Also, the impact on bundle size seems to be between 1 and 3 MB
Thank you for measuring the app start performance @baptiste-marchand. It does look that Braze SDK does not introduce a lot of overhead to the native modules. That is great to know.
Approved
| manifestPlaceholders.MM_BRANCH_KEY_LIVE = "$System.env.MM_BRANCH_KEY_LIVE" | ||
|
|
||
| // Braze SDK credentials — names match .android.env / build.sh exports | ||
| resValue "string", "com_braze_api_key", "${System.env.MM_BRAZE_API_KEY_ANDROID ?: ''}" |
There was a problem hiding this comment.
Will the app work with an empty string?
If not we need to update documentation on how to create one to build, but the best path would be this secret not be mandatory
There was a problem hiding this comment.
Yes it works. The consequence is that Braze SDK does nothing



Description
This PR is the first part of Braze integration. It's currently only creating Braze users based on their profile id, and registering their FCM/APN tokens to start filling up Braze database with tokens.
Changelog
CHANGELOG entry: Added Braze SDK to enhance push notifications capabilities
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/GE-107
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds a new third-party push/engagement SDK and changes native push handling/initialization on both iOS and Android, which could affect notification delivery and app startup. Build tooling changes (Kotlin forcing + patched dependency) also increase risk of platform-specific build regressions.
Overview
Introduces Braze as a new mobile dependency and wires it into both native platforms to start registering push tokens and supporting Braze-driven notifications.
On Android, adds Braze API key/endpoint injection via Gradle resources, registers
BrazeFirebaseMessagingServiceas the primary FCM handler with a fallback to the existing RN Firebase service, and initializes Braze lifecycle callbacks; it also pins Kotlin/serialization versions and patches@braze/react-native-sdkto keep builds compatible with Kotlin 1.9.On iOS, adds Braze keys to Info.plists and initializes a shared
Brazeinstance inAppDelegateusing build-injected credentials, enabling Braze push automation while preserving the existing permission flow.On the JS side, adds a small
app/core/Brazelayer plususeBrazeIdentityhooked intouseIdentityEffectsto callBraze.changeUser(profileId)on sign-in (skipped in E2E), along with Jest mocks/tests and new build/CI env vars for Braze secrets (examples,build.sh, workflow, and config verification).Written by Cursor Bugbot for commit 29b58cd. This will update automatically on new commits. Configure here.