Skip to main content

Restore Purchases Paywall Button Implementation

  • January 6, 2024
  • 1 reply
  • 348 views

Forum|alt.badge.img+3

Hello, I recently was having trouble handling the “Restore purchases” button that can be added to a RC Paywall.

There is a native alert being presented each time the restore was successful, however the restoreCompleted closure only executes once. I see the purpose behind this was preventing unnecessary processing as the user has already indeed restored his stuff, nonetheless it’s completely intuitive.

On a side note, the native alert showing up is prompt to conflict with some UI logic passed in restoreCompleted. i.e.: If you want to update the binding on a fullScreenCover(isPresented:) to dismiss the View it will not take effect, the binding will be updated but the View remain visible, un-syncing the binding hence making it unusable. This is the result of the native alert being shown and interfering with SwiftUI.

I propose a boolean value to decide if an alert will be shown when the restoring process completes.

 

This post has been closed for comments

1 reply

Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • 382 replies
  • January 10, 2024

Hey @chizzatto ,

 

Thanks for the feedback, I have shared this feedback with the team who handles paywalls to get some more eyes on this! 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings