Skip to content
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

iOS - Full Screen paywall restore purchase doesn't dismiss #1161

Open
10 of 11 tasks
ch-alexander opened this issue Sep 11, 2024 · 5 comments
Open
10 of 11 tasks

iOS - Full Screen paywall restore purchase doesn't dismiss #1161

ch-alexander opened this issue Sep 11, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@ch-alexander
Copy link

ch-alexander commented Sep 11, 2024

‼️ Required data ‼️

Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!

Environment

  • Output of flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.6.1 23G93 darwin-arm64, locale en-AU)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google
    Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2023.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.1)
[✓] Connected device (4 available)
[✓] Network resources

! Doctor found issues in 1 category.
  • Version of purchases-flutter: 8.1.0 (same for purchases_flutter_ui)
  • Testing device version: iOS 17.5.1
  • How often the issue occurs - every time. Sandbox. Production unverified.
  • Debug logs that reproduce the issue
  • Steps to reproduce, with a description of expected vs. actual behavior

Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Describe the bug

iOS RevenueCat Paywall UI does not dismiss if a user restores purchases successfully. On Android, it does dismiss.

Background, we allow users to sign in with multiple accounts. Each account may require a subscription. If a user logs in on any device, and doesn't have an active subscription, the paywall screen is presented.

  1. Log into the app as a user
  2. Present full screen paywall modal to user
  3. Have user subscribe to a plan successfully
  4. Log out of the app user
  5. Log in as a different user
  6. Have the paywall presented to user again (in our case because they switched accounts)
  7. Restore purchases
  8. Purchase restored successfully dialog appears
  9. Dismiss the dialog

image

Expected behavior: Paywall dismisses with a restored result

Actual behavior: Paywall remains open waiting for the user to click the subscribe button or close the modal.

Additional context

  • If the user attempts to subscribe again (they receive an already subscribed message) then a restored result is returned. image
  • If the user closes the paywall, the restored result is returned.
@ch-alexander ch-alexander added the bug Something isn't working label Sep 11, 2024
@RCGitBot
Copy link
Contributor

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@Jethro87
Copy link

@ch-alexander Thanks for reporting this. Are you displaying the paywall with either of the presentPaywall methods, or are you using the PaywallView widget (documentation)? If you're using the PaywallView, have you implemented onRestoreCompleted, and if you have, is anything logged when a restore happens?

@Trulsmatias
Copy link

Trulsmatias commented Sep 14, 2024

Same problem here. Using RevenueCatUI.presentPaywallIfNeeded @Jethro87

Although the paywall result is restored when manually dismissing the paywall after pressing restore purchases. It is always purchased when pressing the "buy"-button regardless if the restore purchases was pressed beforehand.

My product is not a subscription but a lifetime product if that matters.

@ch-alexander
Copy link
Author

@ch-alexander Thanks for reporting this. Are you displaying the paywall with either of the presentPaywall methods, or are you using the PaywallView widget (documentation)? If you're using the PaywallView, have you implemented onRestoreCompleted, and if you have, is anything logged when a restore happens?

@Jethro87 We are using RevenueCatUI.presentPaywallIfNeeded

@Trulsmatias
Copy link

Are there any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants