Skip to main content
Question

addCustomerInfoUpdateListener is never called

  • Sep 25, 2022 12:16 AM UTC
  • 4 replies
  • 1305 views

Forum|alt.badge.img+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.

This post has been closed for comments

4 replies

Forum|alt.badge.img+2
  • Author
  • New Member
  • Oct 4, 2022 5:31 PM UTC

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


Forum|alt.badge.img+3
  • New Member
  • Oct 21, 2022 3:41 AM UTC

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).

 


Forum|alt.badge.img+2
  • New Member
  • Nov 11, 2022 9:19 PM UTC

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


Forum|alt.badge.img+2
  • New Member
  • Nov 11, 2022 9:33 PM UTC

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