Skip to main content
Question

offerings.current.paywall always null in swift

  • November 14, 2025
  • 1 reply
  • 12 views

Forum|alt.badge.img

Hi friends, i am working on project using swift revenuecat as the purchasing library,
now i want to detect from my code if the paywall was not set for the offering, but i cant find any way to do that, 
the problem is the return value from offerings.current.paywall is always nil, ofcourse i already setup in the dashboard, event the paywall can be shown in app

if there is some one who have any experience with this, please help?

here is my code to make more clean,

 

Purchases.shared.getOfferings { offerings, error in

        guard let offering = offerings?.current, error == nil else {

            print("❌ Failed to fetch offerings:", error?.localizedDescription ?? "")

            // fallback to custom popup if failed

            presentCustomSubscription(on: visibleController)

            return

        }

        print("Current offering:", offerings?.current?.identifier ?? "none")

 

        print(offering.paywall?.templateName ?? "none");

        // Check if paywall is set

        if let paywall = offering.paywall {

            print("✅ Paywall is set: \(paywall)")

        } else {

            print("⚠️ No paywall set for this offering.")//<-always go here because curent paywall is always nil

            return

        }
}


thank you

This post has been closed for comments

1 reply

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • November 17, 2025

Hi ​@AppStarfamily!

You’ll want to check `paywallComponents` instead - `.paywall` is for legacy paywalls. You can also check `hasPaywall` on the offering which will inform you if a paywall is configured or not for the offerings.