Provide the package in the paywallFooter closures like PurchaseOrRestoreCompletedHandler, PurchaseCancelledHandler or PurchaseFailureHandler
Opened this issue ยท 3 comments
Hello,
I'm using the paywallFooter ViewModifier in my SwiftUI app.
I want to track some analytics regarding the package being purchased.
As of today, we don't have access to this package in all closures, it's only available in the PurchaseOfPackageStartedHandler
.
Can you please add the package in the PurchaseOrRestoreCompletedHandler
, PurchaseCancelledHandler
and PurchaseFailureHandler
?
Thanks,
Axel
Hey @alpennec,
I'll ask the engineering team if we can add the package to PurchaseFailureHandler
and PurchaseCancelledHandler
, but I'm curious how you would want the package to be added to PurchaseOrRestoreCompletedHandler
. The restore operation is not package specific. Purchases of none, one, or some products might be restored as a result of restorePurchases
and it's also not always possible to map purchases of products to packages since you typically don't need to display an offering in order to restore purchases. Was there something you had in mind for PurchaseOrRestoreCompletedHandler
?
Hey @mshmoustafa,
Thanks for answering.
You're right, the PurchaseOrRestoreCompletedHandler
when restoring is not package specific. But is it necessary that this handler is used for both purchase success and restore success? I would imagine a PurchaseCompletedHandler
and a PurchasesRestoredHandler
that could be used for specific logic. Like I want to show a specific success alert to my users when they purchase and another one when they restore. This is not necessarily the same logic in apps.
Thanks.
Axel
I think this request make sense! I'll add to our list of things to get to ๐