Solution found:
if #available(iOS 18.2, *) {
result = try await product.purchase(confirmIn: viewController)
} else {
result = try await product.purchase()
}
Topic:
App & System Services
SubTopic:
StoreKit
Tags: