Add number and boolean support for CustomVariable#1675
Merged
Conversation
Previously custom variables only supported string values. This adds number and boolean types so the native SDKs can use typed values for conditional paywall logic instead of converting everything to strings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Avoids a breaking change for any downstream code importing the old symbol from the package entrypoint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Non-finite numbers can behave unpredictably across the RN bridge. Skip them with a console warning instead of passing them through. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
vegaro
approved these changes
Mar 18, 2026
facumenzella
commented
Mar 18, 2026
- Add comment clarifying why getString needs null check (returns String?) while getDouble/getBoolean return primitives - Remove unnecessary @deprecated tag from internal alias Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
facumenzella
pushed a commit
that referenced
this pull request
Mar 18, 2026
**This is an automatic release.** ## RevenueCat SDK ### ✨ New Features * Add offeringId override to trackCustomPaywallImpression (#1679) via Rick (@rickvdl) ### 📦 Dependency Updates * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.52.0 (#1680) via RevenueCat Git Bot (@RCGitBot) ## RevenueCatUI SDK ### ✨ New Features * Add number and boolean support for CustomVariable (#1675) via Facundo Menzella (@facumenzella) --------- Co-authored-by: RevenueCat CI <dev+ci@revenuecat.com>
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.
Summary
CustomVariableValuewithnumberandbooleantypes (previously string-only)BasePaywallViewManager,RNPaywallsModule) to read typed values viaReadableTypedispatchPaywallViewWrapper) to callsetCustomVariableNumber:forKey:andsetCustomVariableBool:forKey:RNPaywalls.m(presentPaywall path) needs no changes — PHC'sPaywallProxyalready handles typed values from the dictionaryMirrors the Flutter implementation: RevenueCat/purchases-flutter#1683
Test plan
npm run apitest)🤖 Generated with Claude Code