NotificationContent

@objc(GetSocialNotificationContent)
@objcMembers
public final class NotificationContent : NSObject

Describe notification content.

  • Notification text.

    Declaration

    Swift

    public var text: String?
  • Notification title.

    Declaration

    Swift

    public var title: String?
  • Action buttons.

    Declaration

    Swift

    public var actionButtons: [NotificationButton]
  • Notification action.

    Declaration

    Swift

    public var action: Action?
  • Template name.

    Declaration

    Swift

    public var templateName: String?
  • Template placeholders.

    Declaration

    Swift

    public var templatePlaceholders: [String : String]
  • Media attachment.

    Declaration

    Swift

    public var mediaAttachment: MediaAttachment?
  • Notification customization.

    Declaration

    Swift

    public var customization: NotificationCustomization?
  • Badge update.

    Declaration

    Swift

    public var badge: NotificationBadge?
  • Create a notification content with text.

    Declaration

    Swift

    @objc(withText:)
    public static func withText(_ text: String) -> NotificationContent

    Parameters

    text

    Notification text.

    Return Value

    New NotificationContent instance.

  • Create a notification content with a template.

    Declaration

    Swift

    @objc(withTemplateName:)
    public static func withTemplate(_ name: String) -> NotificationContent

    Parameters

    name

    Notification template name.

    Return Value

    New NotificationContent instance.

  • Append an action button.

    Declaration

    Swift

    @objc(appendActionButton:)
    public func appendActionButton(_ actionButton: NotificationButton)

    Parameters

    actionButton

    Action button.

  • Set template placeholders.

    Declaration

    Swift

    @objc(setTemplatePlaceholderValue:forKey:)
    public func setTemplatePlaceholder(value: String, forKey: String)

    Parameters

    value

    Template placeholder value.

    forKey

    Template placeholder key.

  • Description.

    Declaration

    Swift

    public override var description: String { get }