Unintentionally "Dismissing Current View" on iOS 17.1.2 in SwiftUI

67 Views Asked by At

When trying to open a URL using

Link(destination: URL(string: terms_url)!) { Text("Terms") }`

the current view unintentionally dismissed to parent view in iOS 17.1.2 SwiftUI. It only occurs in this newest version (as of Dec 9, 2023) of iOS. This bug also appears when running these lines of code:

let product: SKProduct = ...//Selected subscription here
let payment = SKPayment(product: product)
SKPaymentQueue.default().add(payment)

I use the environment variable @Environment(\.dismiss) to dismiss the view in question. But I assure that this issue is not caused by that.

0

There are 0 best solutions below