Link to notification settings on iOS
After iOS 16
Use openNotificationSettingsURLString
, a constant in Swift for linking to your app's notification settings.
See the relevant Apple Developer documentation
Usage:
swift
if #available(iOS 16.0, *) {
return UIApplication.openNotificationSettingsURLString
}
After iOS 15.4
Use the deprecated constant UIApplicationOpenNotificationSettingsURLString
.
swift
if #available(iOS 15.4, *) {
return UIApplicationOpenNotificationSettingsURLString
}
See the relevant Apple Developer documentation
Before iOS 15.4
Before iOS 15.4, you cannot link specifically to the notifications settings. Only to your app's settings page.
swift
return UIApplication.openSettingsURLString