You can access your app's settings page URL from the UIApplication.openSettingsURLString property.
Use it like this:
Button("Open Settings") {
// Get the settings URL and open it
if let url = URL(string: UIApplication.openSettingsURLString) {
UIApplication.shared.open(url)
}
}
There is currently no way to deep link directly to your app's location settings.
iOS 16 did, however, introduce a UIApplication.openNotificationSettingsURLString property for the notifications settings section, so maybe the location settings URL is possible in the future, or through this.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: