Repository navigation
Conversation
Lets apps customize the native checkpoint error dialog through a callback. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
vegaro
force-pushed
the
cesar/checkpoint-error-dialog-callback
branch
from
October 29, 2026 10:21
6e5794b to
bc53274
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apps can choose custom native dialog content, the SDK's default dialog, or no dialog through
CheckpointParams.errorDialogFactory. The factory receives the actual error (kind,code,message) and returns aCheckpointErrorDialogOutcome, directly or through a promise:{ type: "show", dialog: { message, buttonTitle } }{ type: "useDefault" }{ type: "suppress" }Both native modules forward the outcome to PHC. The SDK handles presentation and acknowledgement. Thrown errors, rejected promises, and invalid outcomes use the default dialog. The SDK waits for pending promises; there is no five-second timeout. Removing the checkpoint callback detaches the factory and resolves pending requests with the default dialog.
This depends on RevenueCat/purchases-ios#8134, RevenueCat/purchases-android#4537, and RevenueCat/purchases-hybrid-common#2043. The dependency pins still point at released versions and need updating when those changes ship.
Validated locally against the updated native branches: 353 JS tests (283 core, 70 UI), TypeScript/UI builds, type and API checks, Android UI bridge compilation, and an iOS simulator app build. The full UI lint command still reports existing
customVariables.tserrors and ano-shadowed-variablerule crash with the installed TypeScript version. The changed checkpoint file passes the other lint rules. No device error flow was exercised.