Skip to main content
Question

iOS26 Beta3 - cannot purchase subscription using originalTemplatePaywallFooter


Forum|alt.badge.img+7
  • Helper
  • 10 replies

We are using RevenueCat paywalls to show a PaywallFooterView using originalTemplatePaywallFooter() on our SwiftUI view.  In iOS26 beta3 (haven’t tried previous betas) when the paywall footer is shown and you click on the “Continue” button to make a purchase, instead of showing the iOS dialog to finalize the purchase, the transaction fails and shows the following in the Xcode terminal: 

 

[Presentation] Attempt to present <UIAlertController: 0x113e85200> on <UIViewController: 0x114ae8800> (from <UIViewController: 0x114ae8800>) whose view is not in the window hierarchy.

 

The same code works fine on iOS18 and below but in iOS26 beta3 I can’t make a purchase.  I updated to the latest RC SDK 5.32.0 and the issue is still there.

 

One wrinkle is that our SwiftUI view that shows the paywall footer is hosted inside a UIKit UIView, so I’m not sure if that is causing an issue or not for RC in the latest build.

3 replies

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

Hey ​@mrd,

Thank you for reporting this. We will check it out!

In the meantime, would you mind sharing a complete code snippet of your implementation so we can reproduce it?


Forum|alt.badge.img+7
  • Author
  • Helper
  • 10 replies
  • July 16, 2025

Hi ​@alejandra-wetsch 

 thanks for the reply. I haven’t run this code because to test with offerings and PaywallV1 I would have to setup a whole new revenue cat project with offerings and paywalls, but the gist of the code is something like this, there is a UIKit UIView, that hosts a SwiftUI View that creates the RC paywall footer, when I click on the “Continue” button in the RC footer to make a purchase I get the error: 

 

[Presentation] Attempt to present <UIAlertController: 0x113e85200> on <UIViewController: 0x114ae8800> (from <UIViewController: 0x114ae8800>) whose view is not in the window hierarchy.

 

And the iOs purchase dialog never appears, so you can’t purchase anything.

 

I haven’t been able to run this code properly because of having to setup a whole new revenue cat project to test it, but the gist of the code looks like below:

 

import UIKit
import SwiftUI
import RevenueCat
import RevenueCatUI

class ViewController: UIViewController {

  override func viewDidLoad() {
    super.viewDidLoad()
    Task {
      await setupRC()
    }
  }

  private func setupRC() async {
    Purchases.logLevel = .debug

    var configBuilder = Configuration.Builder(withAPIKey: "YOUR_REVENUCAT_API_KEY_HERE")

    configBuilder = configBuilder
      .with(appUserID: UUID().uuidString)
      .with(networkTimeout: 10.0)

    Purchases.configure(with: configBuilder.build())

    do {
      guard let offering = try await Purchases.shared.offerings().current else {
        print("no offerings found")
        return
      }

      showPaywall(offering: offering)
    } catch {
      print("failed to fetch offerings")
    }
  }

  func showPaywall(offering: Offering) {
    let vc = UIViewController()
    vc.view = PaywallView(offering: offering)
    vc.isModalInPresentation = true
    vc.modalPresentationStyle = .formSheet
    self.present(vc, animated: true)
  }
}

final class PaywallView: UIView {
  private let offering: Offering

  init(offering: Offering) {
    self.offering = offering
    super.init(frame: CGRect.zero)
    createContentView()
  }

  required init?(coder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
  }

  private func createContentView() {
    // The content of our paywallview is a swiftui view

    let contentView = PaywallContentView(offering: offering)
    let hostingView = UIHostingController(rootView: contentView)
    hostingView.view.backgroundColor = .none
    addSubview(hostingView.view!)
    NSLayoutConstraint.applyConstraints([
      hostingView.view!.leadingAnchor.constraint(equalTo: leadingAnchor),
      hostingView.view!.trailingAnchor.constraint(equalTo: trailingAnchor),
      hostingView.view!.bottomAnchor.constraint(equalTo: bottomAnchor),
      hostingView.view!.topAnchor.constraint(equalTo: topAnchor)
    ])
  }
}

struct PaywallContentView: View {
  let offering: Offering

  var body: some View {
    ScrollView {

    }
    .scrollDisabled(true)
    .originalTemplatePaywallFooter(
      offering: offering,
      condensed: true,
      fonts: CustomPaywallFontProvider(fontName: "FoundersGrotesk-Regular"),
      purchaseStarted: { package in
        print("purchase started")
      },
      purchaseCompleted: { customerInfo in
        print("purchase completed")
      },
      purchaseCancelled: {
        print("purchase cancelled")
      },
      restoreStarted: nil,
      restoreCompleted: nil,
      purchaseFailure: { error in
        print("purchase failed")
      },
      restoreFailure: nil
    )
  }
}

extension NSLayoutConstraint {
  public class func applyConstraints(_ constraints: [NSLayoutConstraint], priority: UILayoutPriority? = nil) {
    for constraint in constraints {
      if let view = constraint.firstItem as? UIView {
        view.translatesAutoresizingMaskIntoConstraints = false
      }

      if let priority = priority {
        constraint.priority = priority
      }
    }
    NSLayoutConstraint.activate(constraints)
  }
}

 


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

Hey ​@mrd

Thank you for the additional details. I will try to reproduce this myself locally and get back to you as soon as I have more information! 

Please let me know if you have any other questions or if there’s anything else I can do for you!


Reply


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