FCMSendMessageRequestBuilder

public class FCMSendMessageRequestBuilder

A builder class which can be used to prepare an FCM send message request.

  • Sets the priority of the message.

    Declaration

    Swift

    @discardableResult
    public func with(priority: FCMSendMessagePriority) -> Self
  • Sets the group of messages that can be collapsed.

    Declaration

    Swift

    @discardableResult
    public func with(collapseKey: String) -> Self
  • Sets whether or not to indicate to the client that content is available in order to wake the device. Note: for messages to iOS devices only.

    Declaration

    Swift

    @discardableResult
    public func with(contentAvailable: Bool) -> Self
  • Sets whether or not the content in the message can be mutated. Note: for messages to iOS devices only.

    Declaration

    Swift

    @discardableResult
    public func with(mutableContent: Bool) -> Self
  • Sets how long (in seconds) the message should be kept in FCM storage if the device is offline.

    Declaration

    Swift

    @discardableResult
    public func with(timeToLive: Int64) -> Self
  • Sets the custom data to send in the payload.

    Declaration

    Swift

    @discardableResult
    public func with(data: Document) -> Self
  • Sets the predefined, user-visible key-value pairs of the notification payload.

    Declaration

    Swift

    @discardableResult
    public func with(notification: FCMSendMessageNotification) -> Self
  • Initializes a new builder for an FCM send message request.

    Declaration

    Swift

    public init()
  • Builds, validates, and returns the FCMSendMessageRequest.

    Declaration

    Swift

    public func build() -> FCMSendMessageRequest

    Return Value

    The built FCM send message request.