Skip to main content
Answer

iOS26 Beta3 - cannot purchase subscription using originalTemplatePaywallFooter

  • July 10, 2025
  • 5 replies
  • 103 views

Forum|alt.badge.img+7

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.

Best answer by mrd

Hi ​@alejandra-wetsch - I just downloaded the beta4 build and it works again, so looks like something changed on Apple’s end that fixed this particular bug.

 

Thanks

Mark.

This post has been closed for comments

5 replies

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

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
  • 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+6

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!


Forum|alt.badge.img+7
  • Author
  • Helper
  • Answer
  • July 23, 2025

Hi ​@alejandra-wetsch - I just downloaded the beta4 build and it works again, so looks like something changed on Apple’s end that fixed this particular bug.

 

Thanks

Mark.


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

Hi ​@alejandra-wetsch - I just downloaded the beta4 build and it works again, so looks like something changed on Apple’s end that fixed this particular bug.

 

Thanks

Mark.

Thank you for confirming, Mark! 

We will keep this scenario under our radar.