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?
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?
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.
Answered by zpasternack on December 25, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP