TransWikia.com

iOS - run app deep link from system settings

Stack Overflow Asked by Monet_z_Polski on December 25, 2021

I see that some iOS apps allow running custom view controllers (or run app with deep link) from system settings. In example of LinkedIn app: Settings -> Notifications -> "LinkedIn Notifications Setting". Tapping on this button opens app and redirects to a custom viewController. How it is done?

enter image description here

I have found documentation about Setting Bundles it seems that this is limited to switches, input fields etc. No deep linking options there:(

How is this achieved? Any limitations to system versions etc?

One Answer

You must include .providesAppNotificationSettings as one of the options when requesting notifications permission.

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

Then, make sure your app delegate conforms to UNUserNotificationCenterDelegate and implement userNotificationCenter(_:openSettingsFor:). Present your custom VC in that method.

UNUserNotificationCenterDelegate Reference

Another useful article on new (iOS 12+) notification stuff

Answered by zpasternack on December 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP