Skip to main content

I’m using RevenueCatUI and have configured the restore button action correctly in the RevenueCat dashboard. It used to work fine, but recently the onRestoreCompleted modifier is no longer being triggered when I tap the restore button that i configured remotely

 

Here’s the code:
PaywallView(displayCloseButton: false)

    .ignoresSafeArea()

    .onAppear {

        print("paywall onAppear")

    }

    .onDisappear {

        print("paywall onAppear")

    }

    .onPurchaseStarted { package in

        print("onPurchaseStarted")

    }

    .onPurchaseCompleted { transaction, customerInfo in

        print("onPurchaseCompleted")

    }

    .onPurchaseCancelled {

        print("onPurchaseCancelled")

    }

    .onPurchaseFailure { error in

        print("Purchase failed with error: \(error)")

    }

    .onRestoreStarted {

        print("Restore started")

    }

    .onRestoreCompleted { customerInfo in

        print("Restore completed, checking subscription status")

    }

    .onRestoreFailure { error in

        print("Restore failed with error: \(error)")

    }

 

Here’s the Console output:


paywall onAppear

Hi, can you please share with me the SDK version you are using, the code for your restore purchase button, as well as full RevenueCat debug logs for this? You can enable them following our guide here and as this may contain sensitive information I recommend submitting this information via a support ticket here.


  • this is another post with similar issue: 

     


I'm doing a hacky workaround for now by creating a timer in .onRestoreStarted and cancelling it in all the other callbacks, in case someone wants a fix a lot sooner than the above PR gets rolled in.

Full code in my comment on 4420.


Reply