russell-archer / StoreHelper

Implementing In-App Purchases with StoreKit2 in Xcode 13 - 15 using SwiftUI, Swift 5.7 - 5.9, iOS 15 - 17 and macOS 12 - 14. Also supports tvOS and visionOS.
MIT License
410 stars 48 forks source link

How to implement custom transaction handler #52

Closed misteral closed 1 year ago

misteral commented 1 year ago

Hello.

Please, recommend me the best way to implement a custom event, specifically for analytic purchase state after a purchase button has been clicked.

Thanks.

russell-archer commented 1 year ago

I've added a transactionNotification property to StoreHelper that will do what you want I think. Take a look at public var transactionNotification: TransactionNotification? in StoreHelper to see how to use it. Let me know if this works for you.

russell-archer commented 1 year ago

Does this work for you? If so, I'll close the issue.

misteral commented 1 year ago

@russell-archer Hi, I just got back to my app now. Yes, it looks like it should work for me. Thanks.