purchases-flutter icon indicating copy to clipboard operation
purchases-flutter copied to clipboard

iOS - Full Screen paywall restore purchase doesn't dismiss

Open ch-alexander opened this issue 1 year ago • 9 comments

‼️ 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

  • [x] 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.
  • [x] Version of purchases-flutter: 8.1.0 (same for purchases_flutter_ui)
  • [x] Testing device version: iOS 17.5.1
  • [x] How often the issue occurs - every time. Sandbox. Production unverified.
  • [ ] Debug logs that reproduce the issue
  • [x] 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 avatar Sep 11 '24 04:09 ch-alexander

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

RCGitBot avatar Sep 11 '24 04:09 RCGitBot

@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 avatar Sep 13 '24 16:09 Jethro87

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.

Trulsmatias avatar Sep 14 '24 09:09 Trulsmatias

@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

ch-alexander avatar Sep 15 '24 22:09 ch-alexander

Are there any updates on this?

Trulsmatias avatar Oct 09 '24 10:10 Trulsmatias

I have same issue with using React Native SDK on iOS. When I restore purchases, presentPaywall is not returning a result until I manually close paywall. Then it is returning RESTORED result.

MetinArslanturk avatar Dec 04 '24 09:12 MetinArslanturk

Same issue here

jacksonw765 avatar Dec 13 '24 22:12 jacksonw765

Same here

HappyIosDeveloper avatar Jan 31 '25 04:01 HappyIosDeveloper

Same issue on android when calling RevenueCatUI.presentPaywall

sonbui00 avatar Feb 18 '25 13:02 sonbui00

any update on this

Krisslk avatar Sep 21 '25 15:09 Krisslk

Hey all, I'm very sorry about the delay on this reply.

We've been auditing our ticketing system and found that this entry was never resolved due to an issue in our system that deprioritized it. We've fixed the issue so it shouldn't happen again!

I am reaching out to our team for a follow up - in the meantime, could you just confirm if this happens solely on the presentPaywallIfNeeded approach and also in which SDK version(s)?

Additionally, is this something that happens consistently for all user IDs used? Is this easily reproducible in your flow and happens in all environments (e.g Sandbox and Production)?

Thanks for your patience here!

GuilhermeMota93 avatar Oct 14 '25 15:10 GuilhermeMota93

@GuilhermeMota93

This was a while ago now. But looking at the projects history we were using purchases_flutter: ^8.1.0 and purchases_ui_flutter: ^8.1.0. These were both resolved to 8.1.0 in the lock file.

In our testing, only presentPaywallIfNeeded was providing an unexpected behaviour. But it's possible presentPaywall was also affected.

ch-alexander avatar Oct 14 '25 22:10 ch-alexander

Thanks for that added context @ch-alexander !

Just to confirm, does this still occur in SDK versions above 8.1.0, or have you not seen it happening since?

GuilhermeMota93 avatar Oct 15 '25 09:10 GuilhermeMota93

Thanks for that added context @ch-alexander !

Just to confirm, does this still occur in SDK versions above 8.1.0, or have you not seen it happening since?

I have not seen it happening in a long while, but I've also not been looking for it as it's such an edge case for our product. I'll try and reproduce this week if I can find time on the version we are currently using.

ch-alexander avatar Oct 15 '25 10:10 ch-alexander

@GuilhermeMota93 I'm not able to replicate anymore in 9.9.0

ch-alexander avatar Oct 27 '25 11:10 ch-alexander