Skip to main content
Question

onPurchaseCompleted handler is not called on recent version of revenueCat ios-purchase5.18

  • March 9, 2025
  • 1 reply
  • 9 views

Forum|alt.badge.img



I’m unable to get the onPurchaseCompleted handler working while testing the purchase. This handler manages the post-purchase UI updates. I am using paywall version 2

 

PaywallView()

.onPurchaseStarted{ _ in

print("onPurhaseStarted: ")

}

.onPurchaseCompleted{ _ in

print("onPurchaseCompleted: ")

isPaywallPresented = false

}

.onRestoreStarted {

print("onRestoreStarted: ")

}

.onRestoreCompleted{ _ in

print("onRestoreCompleted: ")

isPaywallPresented = false

}

.onPurchaseFailure { error in

print("purchase error \(error)")

isPaywallPresented = false

}

.onRequestedDismissal {

print("onRequestedDismissal: ")

isPaywallPresented = false

}

.onDisappear {

print("ModalView dismissed") // Action when dismissed

}

1 reply

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 313 replies
  • March 12, 2025

Hi ​@vidisha-srivastava-6e6f6d,

We had an issue with those view modifiers in the first implementation of paywalls v2. Upgrading the SDK to the latest version should fix your issue. Let me know if that works!

 

Best,


Reply


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