purchases-ios icon indicating copy to clipboard operation
purchases-ios copied to clipboard

in-app purchases handling on SK2

Open morisgateno-appsflyer opened this issue 1 year ago • 3 comments

Hi.

The below function seems not to handle the consumable purchase. https://github.com/RevenueCat/purchases-ios/blob/7b1d0b3044b2fce6c334931adb5d9c0ee3a7fd2d/Sources/Purchasing/StoreKit2/StoreKit2TransactionListener.swift#L121

On the other hand, when doing observerMode = true, the purchase is handled on: https://github.com/RevenueCat/purchases-ios/blob/7b1d0b3044b2fce6c334931adb5d9c0ee3a7fd2d/Sources/Purchasing/StoreKit2/Observer%20Mode/StoreKit2ObserverModePurchaseDetector.swift#L61

So technically when not observing the the consumables are not observed?

Thanks. Moris.

morisgateno-appsflyer avatar Oct 09 '24 07:10 morisgateno-appsflyer

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

RCGitBot avatar Oct 09 '24 07:10 RCGitBot

Hi @morisgateno-appsflyer, thanks for filing this ticket!

Would you mind providing some additional info about the issue you're seeing so we can get a better understanding of what's going on?

  • What SDK version are you using?
  • How is your app configuring the SDK? Which configuration options are you using?
  • What is the expected/actual behavior that you're seeing?
  • What is the code doing when you are experiencing the issue? Can you provide a code snippet?
  • What environments and OS versions are you seeing your issue in? Production, sandbox, Xcode?

Thanks!

fire-at-will avatar Oct 09 '24 13:10 fire-at-will

  • 5.5.0
Purchases.logLevel = .debug
Purchases.configure(withAPIKey: "<API_KEY>", appUserID: nil)

I want to debug what happens to a purchase observer after I purchase a consumable product. StoreKit2TransactionListener class seems to catch only subscriptions and non-consumables.

I see you use Transaction.update which actually make sense it will not catch consumable in-apps.

How can I catch the consumable in-apps if so?

What is the StoreKit2ObserverModePurchaseDetector?

  • sandbox

Thanks. Moris.

morisgateno-appsflyer avatar Oct 10 '24 07:10 morisgateno-appsflyer

Hi @morisgateno-appsflyer, apologies for the long delay here. Were you able able to find what you were looking for?

If not, when you say that you're trying to catch the consumables, what do you mean? Are you trying to debug how a consumable purchase is processed in observer mode with StoreKit 2?

fire-at-will avatar Mar 20 '25 20:03 fire-at-will

Hi @morisgateno-appsflyer, I'm going to go ahead and close out this issue, but feel free to re-open it or create a new issue and tag me in it if you're still having issues. Thanks!

fire-at-will avatar Mar 31 '25 13:03 fire-at-will