OpenURL environment variable provides ability to open URLs from SwiftUI views. We can use it to open website, email form, deep-link embedded in the app or settings app on the device.
The OpenURL structure is defined in app’s Environment and it gives us access to its instance for app’s current Environment via environment variable. We use it to open a URL in response to some action performed by the user or the app.