Question

addCustomerInfoUpdateListener is never called

  • 25 September 2022
  • 4 replies
  • 745 views

Badge +2

Using react-native-purchases v5.0.2 and I can’t seem to get Purchases.addCustomerInfoUpdateListener to fire when I make a purchase (it’s not a subscription in case that matters). Testing in both simulator and a device and neither seems to work.

I have a hook to track “premium” status and I want my tab view to automatically update when premium is unlocked from a different screen. I could hack in a manual call to `getCustomerInfo` when a screen regains focus but this is error prone so I’d really like to avoid it.

 

Also, in case it matters. The documentation mentions:

This will fire whenever we receive a change in purchaser info on the current device and you should expect it to be called at launch and throughout the life of the app.

But I’m not seeing it “called at launch” either.

 

Any help here is greatly appreciated.


4 replies

Badge +2

I opened a PR fixing this for react native I believe https://github.com/RevenueCat/react-native-purchases/pull/473

Badge +2

Bump, I am also seeing this in React Native. I do not even see it called when I call getCustomerInfo

Badge +3

Hey,

 

I experienced the same issue, however, it was on Flutter. I started receiving updates from event listener once I updated to the latest version and changed to renamed APIs (https://github.com/RevenueCat/purchases-flutter/blob/main/CHANGELOG.md#renamed-apis).

 

Badge +2

Just wanted to bump this thread as I still can’t figure out why it isn’t working.

Reply