How to jump from system push notifications settings to personal push notifications settings in the application?

I saw such buttons in some applications in the push notifications settings, which open the personal notification settings in the application. I could not find information on how to implement this. Please tell me how to add this to my application. enter image description here

Upvotes: 1

Views: 409

Answers (1)

Alihan
Alihan

Reputation: 668

On the request notification authorization you should add providesAppNotificationSettings like below.

UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .alert, .sound, .providesAppNotificationSettings])

After that you need to redirect user to your app's settings page below function.

func userNotificationCenter(_ center: UNUserNotificationCenter, openSettingsFor notification: UNNotification?) { // Redirect User to App Settings Page}

Upvotes: 1

Related Questions