RevenueCat/purchases-kmp

PurchasesDelegate.onCustomerInfoUpdated is not being called on subscription state update

Closed this issue · 3 comments

After making a purchase using RevenueCat paywall, the customer info is not being updated (onCustomerInfoUpdated is being called)

    private fun configure() {
        Purchases.configure(getPurchasesApiKey())
        Purchases.sharedInstance.delegate = object : PurchasesDelegate {
            override fun onCustomerInfoUpdated(customerInfo: CustomerInfo) {
                onReceived(customerInfo)
            }

Explicitly updating customer info from cache using this function works as expected.

        Purchases.sharedInstance.getCustomerInfo(
            CacheFetchPolicy.CACHE_ONLY,
            onError = {},
            onSuccess = {
                onReceived(it)
            })

compose-plugin = "1.6.11"
kotlin = "2.0.0"
purchases-common = "13.2.0"
purchases-kmp = "1.0.0+13.2.0"

Thanks for reporting this! Are you experiencing this on Android, iOS, or both?

I believe it was both

Thanks! I have been able to reproduce it on iOS, and I'm looking into a fix. On Android it seems to work well for me.