Superwall-iOS icon indicating copy to clipboard operation
Superwall-iOS copied to clipboard

[BUG] Paywall becoming blank after second presentation on macOS (Catalyst)

Open g-laures opened this issue 5 months ago • 5 comments

New issue checklist

  • [x] I have reviewed the README and documentation
  • [x] I have searched existing issues and this is not a duplicate
  • [ ] I have attempted to reproduce the issue and include an example project.

General information

  • Superwall version: 4.4.1
  • Xcode version: 16.4
  • Devices/Simulators affected: macOS 15.5 via Catalyst

Describe the bug

The paywall controller is created via Superwall.shared.getPaywall(forPlacement:... then assigned to a window.

The first time it's presented, it works as expected, you can interact with it, subscribe... But the second time, it becomes blank as soon as you click anywhere. Not necessarily on a button.

Here is a screenshot of the paywall window after a random click on it, the second time it was presented:

Image

Steps to reproduce

  • Present paywall
  • Close it
  • Present paywall
  • Click anywhere

Other Information

The code to present the paywall on an iPad, is the same but there it works as expected, no blank paywall issue even after two or more presentation.

g-laures avatar Jun 05 '25 10:06 g-laures

Hi, I've been able to reproduce this, it's very strange. If I use register or a PaywallView though, this doesn't happen. Instead of using getPaywall are you able to use a PaywallView? Otherwise, what's your setup for getPaywall exactly, can you give code samples for how you're presenting the view etc.

yusuftor avatar Jun 05 '25 16:06 yusuftor

Hi, thank you for the reply.

are you able to use a PaywallView?

It would require much more changes as our current code around paywalls is based on UIKit. So for now, no.

can you give code samples for how you're presenting

I simplified a bit but that's pretty much it:

func presentInWindow(_ window: UIWindow) {
    let paywallVC = Superwall.shared.getPaywall(forPlacement: value, delegate: self)
    window.rootViewController = viewController
}

g-laures avatar Jun 06 '25 10:06 g-laures

Still looking into this. Are you able to use register? What's the reason you opted for getPaywall?

yusuftor avatar Jun 09 '25 14:06 yusuftor

Are you able to use register? What's the reason you opted for getPaywall?

We have our own abstracted logic to present any paywall from any provider (Superwall, RC...) on any platform (iOS, iPadOS, macOS). So no, we cannot use register as we need a UIViewController.

g-laures avatar Jun 10 '25 09:06 g-laures

Any update on this?

g-laures avatar Jul 16 '25 11:07 g-laures