Solved

SwiftUI Paywall - event handling block support?

  • 13 December 2023
  • 3 replies
  • 64 views

Badge +2

Hi,

 

I just started looking into RevenueCat and had a question regarding the Paywall feature.

Is there a way to set event handlers to the paywall so that we can detect

  1. User cancelled
  2. Purchase Successful
  3. Error

We currently have analytics around these events and would like to retain the behavior. We can migrate our existing paywall to use the purchase API directly. However, Paywall seems to provide an easy way for us to experiment with different designs..etc.

 

This should be relatively easy to implement. Can it be added?

icon

Best answer by wes_clark 15 December 2023, 21:03

View original

3 replies

Badge +2

Found onPurchaseCompleted and onRestoreCompleted view modifiers. I think these should at least tell me when it completes a purchase.

Userlevel 3
Badge +5

Hi! Event handlers for cancellations and errors are not currently available, but I have gone ahead and shared this feedback with the product team. 

Badge +2

Thanks!

Reply