CustomMessage

public class CustomMessage : BaseMessage

Custom Messages are used when you want to send messages that do not fit in any default categories provided

  • provides the type of Custom Message

    Declaration

    Swift

    @objc
    public var type: String? { get set }
  • provides the data of Custom Message

    Declaration

    Swift

    @objc
    public var customData: [String : Any]? { get set }
  • provides the subType of Custom Message

    Declaration

    Swift

    @objc
    public var subType: String? { get set }
  • Initialiser of Custom Message Object

    Declaration

    Swift

    @objc
    public init(receiverUid: String, receiverType: CometChat.ReceiverType, customData: [String : Any])
  • Initialiser of Custom Message Object with additional parameters

    Declaration

    Swift

    @objc
    public init(receiverUid: String, receiverType: CometChat.ReceiverType, customData: [String : Any], type: String?)
  • Method for converting json into BaseMessage

    Declaration

    Swift

    public static func customMessage(fromJSON message: [String : Any]) -> (BaseMessage?, CometChatException?)
  • provides the string representation of Custom Message Object

    Declaration

    Swift

    @objc
    public func stringValue() -> String