Hello everyone,
I apologize for the double post, as there was an issue with the previous one where some of my private data got published unintentionally. I appreciate your understanding.
Now, I'm facing a challenge while implementing subscription functionality using RevenueCat, and I could really use your guidance. Here's the scenario:
When a user clicks on any subscription plan on the paywall, I disable the buttons to prevent multiple clicks. However, I'm unsure how to handle the situation when the user closes the subscription sheet without completing the subscription process. This leaves them on the paywall without re-enabling the buttons.
I would greatly appreciate any advice or suggestions on how to catch this event or find a solution that allows me to re-enable the buttons in this specific case. My goal is to ensure a seamless user experience, even when users accidentally close the subscription window.
Button(action: {
isProcessing = true
if let package = subscriptionManager.packages?.first(where: { $0.identifier == "$rc_lifetime" }) {
Purchases.shared.purchase(package: package) { (transaction, purchaserInfo, error, userCancelled) in
if purchaserInfo?.entitlements.all["PREMIUM"]?.isActive == true {
subscriptionManager.updateInfo()
} else {
isProcessing = false
showAlert = true
alertTitle = "Purchase Failed"
alertMessage = error?.localizedDescription ?? "An unknown error occurred."
}
}
}
}) {
VStack {
Text("$24.99 One-Time Payment")
Text("Lifelong access")
}
}

Thank you all in advance for your assistance. I look forward to your response and resolving this issue.