iOS ≥ 12 Adds “APP Notification Settings Page” Shortcut in User’s “Settings” (Swift)
Besides turning off notifications from the system, users have other options.
Following the previous three articles:
-
What? iOS 12 Can Send Push Notifications Without User Permission (Swift)
-
Handling Push Notification Permission Status from iOS 9 to iOS 12 (Swift)
Let’s continue improving push notifications by experimenting with both existing technologies and newly available features!
What’s this time?
iOS ≥ 12 allows adding a shortcut to your APP’s notification settings page within the user’s “Settings,” giving users more options when adjusting notifications; they can jump to “inside the APP” instead of directly turning off notifications from the “system side.” Let’s start with a picture:

“Settings” -> “APP” -> “Notifications” -> “Set in APP”
Additionally, when users receive a notification and use 3D Touch to adjust settings to “Turn Off” notifications, there will be an extra option called “Settings in App” for users to choose.

“Notifications” -> “3D Touch” -> “…” -> “Turn Off…” -> “Set in App”
How to Implement?
This part of the implementation is very simple. The first step is to request an additional .providesAppNotificationSettings permission when asking for push notification authorization.
//appDelegate.swift didFinishLaunchingWithOptions or....
if #available(iOS 12.0, *) {
let center = UNUserNotificationCenter.current()
let permissiones:UNAuthorizationOptions = [.badge, .alert, .sound, .provisional,.providesAppNotificationSettings]
center.requestAuthorization(options: permissiones) { (granted, error) in
}
}

After asking the user for notification permission, if notifications are enabled, the option will appear below ( regardless of whether the user allowed or denied earlier ).
Step 2:
The second and final step is to make the appDelegate conform to the UNUserNotificationCenterDelegate protocol and implement the userNotificationCenter(_ center: UNUserNotificationCenter, openSettingsFor notification: UNNotification?) method!
//appDelegate.swift
import UserNotifications
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self
}
return true
}
//Other parts omitted...
}
extension AppDelegate: UNUserNotificationCenterDelegate {
@available(iOS 10.0, *)
func userNotificationCenter(_ center: UNUserNotificationCenter, openSettingsFor notification: UNNotification?) {
// Navigate to your settings page...
//EX:
//let VC = SettingViewController();
//self.window?.rootViewController.present(alertController, animated: true)
}
}
-
Implement the delegate in AppDelegate’s didFinishLaunchingWithOptions method
-
AppDelegate conforms to the delegate and implements the method
Done! Compared to previous articles, implementing this feature is much simpler 🏆
Summary
This feature is somewhat similar to the approach mentioned in the previous article where silent notifications with lower interference are sent to users without requiring their authorization, to test the waters first!
They all build a new bridge between developers and users. In the past, when an app was too noisy, we would go straight to the settings page and ruthlessly turn off all notifications. However, this means that developers can no longer send any notifications—good, bad, or useful—to users, who might miss important messages or exclusive offers.
This feature allows users to choose to enter the app to adjust notifications when they want to turn off notifications. Developers can categorize push notification items, letting users decide which types of notifications they want to receive.

Take the Wedding App as an example. If users find the column notifications too distracting, they can turn them off individually while still receiving important system messages.
p.s The option to individually disable notifications is already a feature of our app, but combining it with iOS ≥12’s new notification features offers better results and improved user experience




Comments