GetSocialNotificationContent Class Reference

Inherits from NSObject
Declared in GetSocialNotificationContent.h

Properties and Methods

– init

Init method, should not be called.

- (instancetype)init

Declared In

GetSocialNotificationContent.h

+ withText:

Create notification with text.

+ (GetSocialNotificationContent *)withText:(NSString *)text

Parameters

text

text to be displayed to receivers.

Return Value

new notification content.

Discussion

Create notification with text.

Declared In

GetSocialNotificationContent.h

+ withTemplateName:

Create notification from the template configured on the GetSocial Dashboard.

+ (GetSocialNotificationContent *)withTemplateName:(NSString *)templateName

Parameters

templateName

name of the template on the GetSocial Dashboard. Case-sensitive.

Return Value

new notification content.

Discussion

Create notification from the template configured on the GetSocial Dashboard.

Declared In

GetSocialNotificationContent.h

– setAction:

Set notification action to be performed on click.

- (void)setAction:(GetSocialAction *)action

Parameters

action

what should be done when user clicks on notification.

Discussion

Set notification action to be performed on click.

Declared In

GetSocialNotificationContent.h

– addActionButton:

Add an action button to the content.

- (void)addActionButton:(GetSocialActionButton *)actionButton

Parameters

actionButton

GetSocialActionButton instance.

Declared In

GetSocialNotificationContent.h

– addActionButtons:

Add array of action buttons to the content.

- (void)addActionButtons:(NSArray<GetSocialActionButton*> *)actionButtons

Parameters

actionButtons

array of GetSocialActionButton instances.

Declared In

GetSocialNotificationContent.h

– setText:

Set notification text. If you use template, your text will be overriden by this.

- (void)setText:(NSString *)text

Parameters

text

notification text.

Discussion

Set notification text. If you use template, your text will be overriden by this.

Declared In

GetSocialNotificationContent.h

– setTitle:

Set notification title. If you use template, your title will be overriden by this.

- (void)setTitle:(NSString *)title

Parameters

title

notification title.

Discussion

Set notification title. If you use template, your title will be overriden by this.

Declared In

GetSocialNotificationContent.h

– setTemplateName:

Set template name. Notification will use values from the GetSocial Dashboard as title and text. But [GetSocialNotificationContent setTitle:] or [GetSocialNotificationContent setText:] have higher priority and will override template values.

- (void)setTemplateName:(NSString *)templateName

Parameters

templateName

name of the template on the dashboard. Case-sensitive.

Discussion

Set template name. Notification will use values from the GetSocial Dashboard as title and text. But [GetSocialNotificationContent setTitle:] or [GetSocialNotificationContent setText:] have higher priority and will override template values.

Declared In

GetSocialNotificationContent.h

– addTemplatePlaceholderValue:forKey:

If you specified placeholders on the GetSocial Dashboard for your template title or text - you can replace it using this method. For example, if your template text it “Hello, [USERNAME].”, call [notificationContent addTemplatePlaceholderValue:@“My actual name” withKey:@“USERNAME”]. Brackets should be omitted in key. Won’t make any effect without template name.

- (void)addTemplatePlaceholderValue:(NSString *)value forKey:(NSString *)key

Parameters

value

actual text that should be used instead.

key

placeholder on the GetSocial Dashboard.

Discussion

If you specified placeholders on the GetSocial Dashboard for your template title or text - you can replace it using this method. For example, if your template text it “Hello, [USERNAME].”, call [notificationContent addTemplatePlaceholderValue:@“My actual name” withKey:@“USERNAME”]. Brackets should be omitted in key. Won’t make any effect without template name.

Declared In

GetSocialNotificationContent.h

– addTemplatePlaceholders:

Add all keys and values from map to template placeholders.

- (void)addTemplatePlaceholders:(NSDictionary<NSString*,NSString*> *)templateData

Parameters

templateData

template placeholders map.

Discussion

Add all keys and values from map to template placeholders.

Declared In

GetSocialNotificationContent.h

– setMediaAttachment:

Attach the media to notification content.

- (void)setMediaAttachment:(GetSocialMediaAttachment *)mediaAttachment

Parameters

mediaAttachment

media attachment.

Discussion

Attach the media to notification content.

Declared In

GetSocialNotificationContent.h

– setCustomization:

Customize notification, like change background image, title and text color. Supported only on Android.

- (void)setCustomization:(GetSocialNotificationCustomization *)customization

Parameters

customization

GetSocialNotificationCustomization instance.

Declared In

GetSocialNotificationContent.h