Skip to main content
Question

onPurchaseCompleted not being called in swift sdk

  • February 12, 2025
  • 5 replies
  • 63 views

Forum|alt.badge.img+1

Hi there,

this is kinda serious I think. The onPurchaseCompleted is not being called whenever I test in sandbox. Since this is the function recommended on the forum by other revenuecat staff, it kinda of shakes my confidence in RC unfortunately, especially when in other posts it was said “the team is investigating the issue”

Could someone kindly help out?

 

    var body: some View {

        // This view immediately triggers RevenueCat's paywall presentation.

        PaywallView(displayCloseButton: false, performPurchase: nil, performRestore: nil)

            .onPurchaseCompleted { res in

                print("YAY! THANK YOU")

                print("res = \(res)")

                onPurchaseCompleted()

            }

            .onPurchaseFailure { error in

                print("purchase error \(error)")

            }

            .onRequestedDismissal {

                

            }

 

    }

 

the `onPurchaseCompleted` and `onPurchaseFailure` are never called but `onRequestedDismissal` is. 

 

This post has been closed for comments

5 replies

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 327 replies
  • February 14, 2025

Hi,

Would you mind sharing in which SDK are you seeing this issue? The previous issue was fixed in later versions and should be working fine now. Are you also testing with paywalls v1 or v2?

Thank you,


Forum|alt.badge.img+1
  • Author
  • Member
  • 6 replies
  • February 14, 2025

Hi ​@joan-cardona 

Thanks for getting back to me. Version is 5.16.1:

 

    {
      "identity" : "purchases-ios-spm",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/RevenueCat/purchases-ios-spm.git",
      "state" : {
        "revision" : "8bfab6b8e76e2bdc88d48dae1e34bc6e842f0bf8",
        "version" : "5.16.1"
      }
    },

 

Paywall V2 

 


Forum|alt.badge.img+1
  • Author
  • Member
  • 6 replies
  • February 15, 2025

@joan-cardona let me know any other info you might need


Forum|alt.badge.img+1
  • Author
  • Member
  • 6 replies
  • February 17, 2025

After a few days of struggling, I’ve just decided to go with Superwall :( 

It’s sad that with all the efforts you guys put in, the SDK is so buggy that I’d have to beg here for a fix/response. 

 


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 327 replies
  • February 20, 2025

Hi ​@sse-16abe8,

Sorry about it! We merged a fix in the latest SDK release that should fix this issue.

I apologize for the inconveniences, paywalls v2 is still in beta and it’s possible that these things happen. We also included some other fixes in the latest release and we’ve seen it working well in production apps.

Let me know if that helps!


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