Skip to main content
Question

method callbacks don't work without observerMode turned on. iOS SDK 4.25.3


Forum|alt.badge.img+1

I’ve got RevenueCat and SuperWall integrated into an older app and I can’t seem to get any of the method callbacks to work without setting observerMode to true on RevenueCat. I’m not handling my own purchases and I want RC to do it for me, so I don’t think that is the right setting… but ti does seem to work and unlock the app in sandbox mode when I do it that way.

 

My SuperWall has a paywallDelegate configured for it where we hand the purchases over to RevenueCat. In that delegate I call the following method on Purchases.shared:

func purchase(product: StoreProduct, completion: @escaping PurchaseCompletedBlock)

For some reason when observerMode is false the PurchaseCompletionBlock just never get’s called. Not even with an error or nil value… When I turn observerMode to true everything works as expected but I’m confused why that should be. Am I reading the documentation wrong? Is there something going on with my SuperWall configuration where it’s somehow making the purchase?

I’ve used the same configuration in other apps and that seems to work fine with observerMode off. I’m not sure what I'm doing different in this implementation.

4 replies

Forum|alt.badge.img+8
  • RevenueCat Staff
  • 421 replies
  • August 26, 2023

Hi, can you let me know if you run debug logs if you are getting any errors? And what language and version of our SDK are you using?


Forum|alt.badge.img+1
  • Author
  • New Member
  • 2 replies
  • August 31, 2023

Hi, yes I’m running the debug logs and here is what I see:

```

2023-08-31 13:36:15.690563-0700 Assembly[44940:5891867] [purchases] DEBUG: ℹ️ TransactionPoster: handling transaction '2000000403286036' for product 'com.pixite.assembly.1weekP' (date: 2023-08-31 20:33:43 +0000)

2023-08-31 13:36:15.709646-0700 Assembly[44940:5891780] [purchases] DEBUG: ℹ️ TransactionPoster: handling transaction '2000000403286036' for product 'com.pixite.assembly.1weekP' (date: 2023-08-31 20:33:43 +0000)

2023-08-31 13:36:16.996304-0700 Assembly[44940:5891868] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000000281e3b3c0) updatedTransaction: com.pixite.assembly.1weekP 2000000403286036 2000000382741477 1

2023-08-31 13:36:17.033331-0700 Assembly[44940:5891868] [purchases] DEBUG: ℹ️ TransactionPoster: handling transaction '2000000403286036' for product 'com.pixite.assembly.1weekP' (date: 2023-08-31 20:33:43 +0000)

2023-08-31 13:36:17.033616-0700 Assembly[44940:5891868] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000000281e3b3c0) updatedTransaction: com.pixite.assembly.1weekP 2000000403286517 2000000382741477 1

[purchases] DEBUG: ℹ️ TransactionPoster: handling transaction '2000000403286517' for product 'com.pixite.assembly.1weekP' (date: 2023-08-31 20:36:43 +0000)

2023-08-31 13:36:17.658522-0700 Assembly[44940:5891867] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000000281e3b3c0) removedTransaction: com.pixite.assembly.1weekP 2000000403286036 2000000382741477 1

2023-08-31 13:36:17.658584-0700 Assembly[44940:5891867] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000000281e3b3c0) removedTransaction for com.pixite.assembly.1weekP but no callbacks to notify

2023-08-31 13:36:18.108893-0700 Assembly[44940:5891761] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000000281e3b3c0) removedTransaction: com.pixite.assembly.1weekP 2000000403286517 2000000382741477 1

2023-08-31 13:36:18.108958-0700 Assembly[44940:5891761] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000000281e3b3c0) removedTransaction for com.pixite.assembly.1weekP but no callbacks to notify

2023-08-31 13:36:21.137894-0700 Assembly[44940:5891459] [purchases] INFO: 💰 Finishing transaction '2000000403286036' for product 'com.pixite.assembly.1weekP'

2023-08-31 13:36:21.138061-0700 Assembly[44940:5891459] [purchases] INFO: 💰 Finishing transaction '2000000403286036' for product 'com.pixite.assembly.1weekP'

2023-08-31 13:36:30.713793-0700 Assembly[44940:5891459] [purchases] INFO: 💰 Purchasing Product 'com.pixite.assembly.1weekP'

2023-08-31 13:36:30.715136-0700 Assembly[44940:5891459] [purchases] DEBUG: ℹ️ Adding payment for product 'com.pixite.assembly.1weekP'. 0 transactions already in the queue.

2023-08-31 13:36:30.718088-0700 Assembly[44940:5891459] [purchases] INFO: 💰 Finishing transaction '2000000403286036' for product 'com.pixite.assembly.1weekP'

2023-08-31 13:36:30.721614-0700 Assembly[44940:5891869] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000000281e3b3c0) updatedTransaction: com.pixite.assembly.1weekP 0

2023-08-31 13:36:32.291842-0700 Assembly[44940:5891459] [purchases] INFO: 💰 Finishing transaction '2000000403286517' for product 'com.pixite.assembly.1weekP'

2023-08-31 13:36:39.668770-0700 Assembly[44940:5891759] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000000281e3b3c0) updatedTransaction: com.pixite.assembly.1weekP 2000000403286794 2000000382741477 1

2023-08-31 13:36:39.704387-0700 Assembly[44940:5891759] [purchases] DEBUG: ℹ️ TransactionPoster: handling transaction '2000000403286794' for product 'com.pixite.assembly.1weekP' (date: 2023-08-31 20:33:43 +0000)

2023-08-31 13:36:40.223380-0700 Assembly[44940:5892096] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000000281e3b3c0) removedTransaction: com.pixite.assembly.1weekP 2000000403286794 2000000382741477 1

2023-08-31 13:36:40.223674-0700 Assembly[44940:5892096] [purchases] DEBUG: ℹ️ StoreKit1Wrapper (0x0000000281e3b3c0) removedTransaction for com.pixite.assembly.1weekP but no callbacks to notify

2023-08-31 13:36:42.013182-0700 Assembly[44940:5891459] [purchases] INFO: 💰 Finishing transaction '2000000403286794' for product 'com.pixite.assembly.1weekP'

```

 

 

It seems like the “removedTransaction for com.pixite.assembly.1weekP but no callbacks to notify” might be important?

 

Here is what the code calling the purchase looks like:

 

The first breakpoint at line 138 gets hit, but the breakpoint in the completion block at line 139 is never hit. Could there be an issue with the fact that we’re wrapping StoreKit1 products?

 

I use this exact same logic in several of our other apps and they work as expected. I’m not sure what’s going on in this one.

 


Forum|alt.badge.img+1
  • Author
  • New Member
  • 2 replies
  • August 31, 2023

@Haley Pace I forgot to mention: I'm running the revenuecat pod version 4.25.8 and compiling on Xcode 14.3.1 with a minimum target of iOS 15.2.


Forum|alt.badge.img+8
  • RevenueCat Staff
  • 421 replies
  • September 25, 2023

Hey, sorry about the delay. I didn’t realize this post was still unresolved. Are you still experiencing this issue?


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