Skip to content

Add a Notification Management Screen

We believe that empowering your end users with the ability to decide which notifications are relevant for them is one of the key elements that maintains an engaged audience, preventing end users from opting out of push notifications altogether.

For this purpose, you can assign your notification templates to groups called "Categories". These categories are then displayed to your end users in a native view that allows them to easily opt in and out of each category.

To use this feature add this to SendMan's config

config.useCategories = true
config.useCategories = YES;

The best part of this view is that presenting these preferences to your users only takes one line of code!

self.presentViewController(SendMan.getCategoriesUIViewController(), animated: true, completion: nil)
[self presentViewController:[SendMan getCategoriesUIViewController] animated:YES completion:nil];


You can also configure the look and feel of this screen to match your app's design if you want to!
Following the high standards of Apple's design principles, the native look and feel of the management screen resembles Apple's Settings apps as closely as possible.

Should you choose to add some of your app's colors to the design of the preference page, here is an example of how to do that:

let preferencesVC = SendMan.getCategoriesUIViewController()
preferencesVC.cellBackgroundColor = .magenta
self.presentViewController(preferencesVC, animated: true, completion: nil)
SMNotificationsViewController *preferencesVC = [SendMan getCategoriesUIViewController];
preferencesVC.cellBackgroundColor = [UIColor magentaColor];
[self presentViewController:preferencesVC animated:YES completion:nil];
Property Description
backgroundColor The background color of the entire preferences view.
switchBackgroundColor The background color of a switch when the switch's category is turned off.
switchOnTintColor The background color of a switch when the switch's category is turned on.
switchThumbColor The thumb color of the switch, regardless of the category's state.
cellBackgroundColor The background color of each category row, containing the category's name, description, and the thumb.
titleColor The text color for category group names, placed above the rows of categories.
descriptionColor The text color of the category's description (or the category group's description, placed under the row).
textColor The text color for category names.