Class iOSNotificationCategory
Represents notification category. Notification categories need to be registered on application start to be useful. By adding actions to category, you make all notification sent with this category identifier actionable.
Namespace: Unity.Notifications.iOS
Syntax
public class iOSNotificationCategory
Constructors
iOSNotificationCategory(String)
Create notification category. Category must be registered using iOSNotificationCenter.SetNotificationCategories.
Declaration
public iOSNotificationCategory(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | A unique identifier for this category |
iOSNotificationCategory(String, IEnumerable<iOSNotificationAction>)
Create notification category. Category must be registered using iOSNotificationCenter.SetNotificationCategories.
Declaration
public iOSNotificationCategory(string id, IEnumerable<iOSNotificationAction> actions)
Parameters
Type | Name | Description |
---|---|---|
String | id | A unique identifier for this category |
IEnumerable<iOSNotificationAction> | actions | Add provided actions to this category |
iOSNotificationCategory(String, IEnumerable<iOSNotificationAction>, IEnumerable<String>)
Create notification category. Category must be registered using iOSNotificationCenter.SetNotificationCategories.
Declaration
public iOSNotificationCategory(string id, IEnumerable<iOSNotificationAction> actions, IEnumerable<string> intentIdentifiers)
Parameters
Type | Name | Description |
---|---|---|
String | id | A unique identifier for this category |
IEnumerable<iOSNotificationAction> | actions | Add provided actions to this category |
IEnumerable<String> | intentIdentifiers | Add provided intent identifiers to this category |
Properties
Actions
Get actions set for this category.
Declaration
public iOSNotificationAction[] Actions { get; }
Property Value
Type | Description |
---|---|
iOSNotificationAction[] |
HiddenPreviewsBodyPlaceholder
The placeholder text to display when the system disables notification previews for the app.
Declaration
public string HiddenPreviewsBodyPlaceholder { get; set; }
Property Value
Type | Description |
---|---|
String |
Id
A unique identifier for this category.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
String |
IntentIdentifiers
Intent identifiers set for this category.
Declaration
public string[] IntentIdentifiers { get; }
Property Value
Type | Description |
---|---|
String[] |
Options
Options for how to handle notifications of this type.
Declaration
public iOSNotificationCategoryOptions Options { get; set; }
Property Value
Type | Description |
---|---|
iOSNotificationCategoryOptions |
SummaryFormat
A format string for the summary description used when the system groups the category’s notifications.
Declaration
public string SummaryFormat { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
AddAction(iOSNotificationAction)
Add action to this category. Actions must be added prior to registering the category.
Declaration
public void AddAction(iOSNotificationAction action)
Parameters
Type | Name | Description |
---|---|---|
iOSNotificationAction | action | Action to add |
AddActions(IEnumerable<iOSNotificationAction>)
Add actions to this category. Actions must be added prior to registering the category.
Declaration
public void AddActions(IEnumerable<iOSNotificationAction> actions)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<iOSNotificationAction> | actions | Actions to add |
AddIntentIdentifier(String)
Add intent identifier to this category. Intent identifiers must be added prior to registering the category.
Declaration
public void AddIntentIdentifier(string identifier)
Parameters
Type | Name | Description |
---|---|---|
String | identifier | Intent identifier to add |
AddIntentIdentifiers(IEnumerable<String>)
Add intent identifier to this category. Intent identifiers must be added prior to registering the category.
Declaration
public void AddIntentIdentifiers(IEnumerable<string> identifiers)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | identifiers | Intent identifiers to add |