Skip to main content
Solved

SwiftUI Paywall - event handling block support?

  • Dec 13, 2023 7:58 PM UTC
  • 3 replies
  • 576 views

Forum|alt.badge.img+3

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?

Best answer by wes_clark

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

View original
This post has been closed for comments

3 replies

Forum|alt.badge.img+3
  • Author
  • New Member
  • Dec 14, 2023 12:03 AM UTC

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


wes_clark
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • Answer
  • Dec 15, 2023 8:03 PM UTC

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


Forum|alt.badge.img+3
  • Author
  • New Member
  • Dec 19, 2023 1:48 AM UTC

Thanks!