Skip to main content
Question

aywallViewControllerDelegate Not Triggering When Using PaywallViewController(offering:) – SDK 5.22.2

  • June 23, 2025
  • 1 reply
  • 13 views

Forum|alt.badge.img

I'm running into an issue when using the PaywallViewControllerDelegate with the RevenueCat iOS SDK version 5.22.2.

I’m presenting the paywall manually using the following code:

extension AppPaywallBuilder {
    func build() -> UIViewController {
        let viewController = PaywallViewController(offering: subscriptionManager.offering)
        viewController.delegate = self
        viewController.modalPresentationStyle = .fullScreen
        return viewController
    }
}

extension AppPaywallBuilder: PaywallViewControllerDelegate {
    func paywallViewController(_ controller: PaywallViewController, didStartPurchaseWith package: Package) {
        print("aaaa")
    }

    func paywallViewController(_ controller: PaywallViewController,
                               didFinishPurchasingWith customerInfo: CustomerInfo) {
        print("aaaa")
    }

    func paywallViewController(_ controller: PaywallViewController,
                               didFinishRestoringWith customerInfo: CustomerInfo) {
        print("aaaa")
    }
}

The issue is that none of the delegate methods are being called — not even when I trigger a purchase or tap the "Restore Purchases" button on the default RevenueCat paywall.

I’m using UIKit and presenting the view controller with .present(viewController, animated: true) as usual.

I’d like to confirm:

  • Should the PaywallViewController(offering:) correctly trigger the PaywallViewControllerDelegate callbacks?

  • Is there any additional configuration needed to get these delegate methods to work?

  • If this approach is no longer supported, what is the recommended way to programmatically present a paywall with full delegate support (including restore callbacks)?

Thanks in advance for your help!

This post has been closed for comments

1 reply

alejandra-wetsch
RevenueCat Staff
Forum|alt.badge.img+1

Hey ​@william-james ,

Thank you for reaching out and for the details provided!

Below you can find my answers:

  • I copied your code, made some tests locally using the same SDK version, and got the delegate methods to be called.
    • Something to consider is that didFinishRestoringWith its only going to get called when a restore operation was successful, meaning that there's a subscription to restore.
  • No additional configuration is needed; your implementation looks correct!
  • This delegate is supported in the version you're using. I recommend updating your SDK to the latest version (5.29.0) to ensure you have all the latest changes available.

Just curious, are you testing this in a simulator or a physical device? Testing on simulators can sometimes have unexpected results, which is why we always recommend developers to test on physical devices instead.

If you are still having issues and would like to share a sample project with us, that would be great for us to troubleshoot further!

I hope this helps. Please let me know if you have any other questions or if there's anything else I can do for you!

Best, 


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