-
Couldn't load subscription status.
- Fork 197
Add support for customer center view without presentCustomerCenter helper
#1476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's looking great! Only thing I think we should fix is to avoid using the global customer center listener to pass the instance listener.
...tter/android/src/main/kotlin/com/revenuecat/purchases_ui_flutter/views/CustomerCenterView.kt
Outdated
Show resolved
Hide resolved
### Motivation - Add a per-view CustomerCenterListener hook so hybrid apps can override callbacks without relying solely on the global Purchases listener. - Ensure the non-Compose API mirrors PaywallView. - Provide a working sample and API coverage so partners can see and compile against the new surface. - Needed for RevenueCat/purchases-flutter#1476 and RevenueCat/react-native-purchases#1411 ### Description - CustomerCenterView now installs an internal proxy listener, accepts an optional listener via constructor or setter, and keeps the global listener as the fallback. - Updated the Paywall Tester app: the App Info screen launches a full-screen dialog that hosts CustomerCenterView, logging/toasting to differentiate the per-view listener from the global handler.
...tter/android/src/main/kotlin/com/revenuecat/purchases_ui_flutter/views/CustomerCenterView.kt
Outdated
Show resolved
Hide resolved
...tter/android/src/main/kotlin/com/revenuecat/purchases_ui_flutter/views/CustomerCenterView.kt
Outdated
Show resolved
Hide resolved
...tter/android/src/main/kotlin/com/revenuecat/purchases_ui_flutter/PurchasesUiFlutterPlugin.kt
Show resolved
Hide resolved
...tter/android/src/main/kotlin/com/revenuecat/purchases_ui_flutter/PurchasesUiFlutterPlugin.kt
Outdated
Show resolved
Hide resolved
...tter/android/src/main/kotlin/com/revenuecat/purchases_ui_flutter/PurchasesUiFlutterPlugin.kt
Show resolved
Hide resolved
...er/ios/purchases_ui_flutter/Sources/purchases_ui_flutter/PurchasesUiCustomerCenterView.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense! Just couple of things that I mention in the comments:
- Does rotation work correctly?
- Does iOS trigger the
onDismisstwice in the view? Becuase both the viewController and the delegate send the event - Some naming suggestions
Other than that, I think this is almost ready to go!
8efc085 to
93d630b
Compare
93d630b to
a72e4e7
Compare
**This is an automatic release.** > [!WARNING] > If you don't have any login system in your app, please make sure your one-time purchase products have been correctly configured in the RevenueCat dashboard as either consumable or non-consumable. If they're incorrectly configured as consumables, RevenueCat will consume these purchases. This means that users won't be able to restore them from version 9.0.0 onward. > Non-consumables are products that are meant to be bought only once, for example, lifetime subscriptions. ## RevenueCat SDK ### 📦 Dependency Updates * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.11.0 (#1507) via RevenueCat Git Bot (@RCGitBot) * [Android 9.11.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.11.0) * [Android 9.10.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.10.0) * [iOS 5.44.1](https://github.com/RevenueCat/purchases-ios/releases/tag/5.44.1) * [iOS 5.44.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.44.0) ## RevenueCatUI SDK ### Customer Center #### ✨ New Features * Add support for customer center view without `presentCustomerCenter` helper (#1476) via Facundo Menzella (@facumenzella) ### 🔄 Other Changes * Bump fastlane-plugin-revenuecat_internal from `25c7fb8` to `525d48c` (#1506) via dependabot[bot] (@dependabot[bot]) * Update Xcode versions to avoid CircleCI deprecation (#1505) via Antonio Pallares (@ajpallares)
Motivation
This PR adds a variant to address #1297
Following existing patterns, this PR adds the necessary code to display
CustomerCenterViewwithout using the helper.