Skip to main content



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

}

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