Restore Purchases Paywall Button Implementation

  • 6 January 2024
  • 1 reply
  • 92 views

Badge +1

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.

 


1 reply

Userlevel 4
Badge +6

Hey @chizzatto ,

 

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

Reply