FCMSendMessageNotificationBuilder

public class FCMSendMessageNotificationBuilder

A builder class which can be used to prepare the notification inside of an FCM send message request.

  • Initializes a new builder for an FCM send message notification.

    Declaration

    Swift

    public init()
  • Sets the notification’s title.

    Declaration

    Swift

    @discardableResult
    public func with(title: String) -> Self
  • Sets the notification’s body text.

    Declaration

    Swift

    @discardableResult
    public func with(body: String) -> Self
  • Sets the sound to play when the device receives the notification.

    Declaration

    Swift

    @discardableResult
    public func with(sound: String) -> Self
  • Sets the action associated with a user click on the notification.

    Declaration

    Swift

    @discardableResult
    public func with(clickAction: String) -> Self
  • Sets the key to the body string in the app’s string resources to use to localize the body text to the user’s current localization.

    Declaration

    Swift

    @discardableResult
    public func with(bodyLocKey: String) -> Self
  • Sets the variable string values to be used in place of the format specifiers in bodyLocKey to use to localize the body text to the user’s current localization.

    Declaration

    Swift

    @discardableResult
    public func with(bodyLocArgs: String) -> Self
  • Sets the key to the title string in the app’s string resources to use to localize the title text to the user’s current localization.

    Declaration

    Swift

    @discardableResult
    public func with(titleLocKey: String) -> Self
  • Sets the variable string values to be used in place of the format specifiers in titleLocKey to use to localize the title text to the user’s current localization.

    Declaration

    Swift

    @discardableResult
    public func with(titleLocArgs: String) -> Self
  • Sets the notification’s icon. Note: for messages to Android devices only.

    Declaration

    Swift

    @discardableResult
    public func with(icon: String) -> Self
  • Sets the identifier used to replace existing notifications in the notification drawer. Note: for messages to Android devices only.

    Declaration

    Swift

    @discardableResult
    public func with(tag: String) -> Self
  • Sets the notification’s icon color, expressed in #rrggbb format. Note: for messages to Android devices only.

    Declaration

    Swift

    @discardableResult
    public func with(color: String) -> Self
  • Sets the value of the badge on the home screen app icon. Note: for messages to iOS devices only.

    Declaration

    Swift

    @discardableResult
    public func with(badge: String) -> Self
  • Builds, validates, and returns the FCMSendMessageNotification.

    Declaration

    Swift

    public func build() -> FCMSendMessageNotification

    Return Value

    The built notification.