GroupChannel

@objc(SBDGroupChannel)
public class GroupChannel : BaseChannel, SortableElement

The GroupChannel class represents a group channel which is a private chat.

The user who wants to join the group channel has to be invited by another user who is already joined the channel. This class is derived from BaseChannel. If the BaseChannelDelegate is added, the user will automatically receive all messages from the group channels where the user belongs after connection. The GroupChannel provides the features of general messaging apps.

  • Typing indicator.
  • Read status for each message.
  • Unread message count in the channel.
  • Lastest message in the channel.

The GroupChannel has a special property, isDistinct. The distinct property enabled group channel is always reuesd for same channel members. If a new member gets invited or the member left from the channel, then the distinct property disabled automatically. If you don’t set distinct property on the channel, it always create new channel for the same members.

For more information, see Group Channel.

  • Last message of the channel.

    Declaration

    Swift

    @objc
    public internal(set) var lastMessage: BaseMessage? { get }
  • Represents the channel is super channel or not.

    Declaration

    Swift

    @objc
    public internal(set) var isSuper: Bool { get }
  • Represents the channel is broadcast channel or not.

    Since

    3.0.171

    Declaration

    Swift

    @objc
    public internal(set) var isBroadcast: Bool { get }
  • Represents the channel is exclusive channel or not.

    Since

    4.0.0

    Declaration

    Swift

    @objc
    public internal(set) var isExclusive: Bool { get }
  • Represents the channel is public channel or private one.

    Declaration

    Swift

    @objc
    public internal(set) var isPublic: Bool { get }
  • Represents that the channel has access code to enter.

    Since

    3.0.116

    Declaration

    Swift

    @objc
    public internal(set) var isAccessCodeRequired: Bool { get }
  • Represents the channel is distinct or not.

    Declaration

    Swift

    @objc
    public internal(set) var isDistinct: Bool { get }
  • Represents a boolean whether the public group channel is discoverable. It is only for a public group channel. The default value is true if the channel is a public group channel. If the channel is not a public group channel, the default value is false.

    Since

    3.0.136

    Declaration

    Swift

    @objc
    public internal(set) var isDiscoverable: Bool { get }
  • Unread message count of the channel.

    Declaration

    Swift

    @Atomic
    @objc
    public internal(set) var unreadMessageCount: UInt { get set }
  • The number of mentions that user does not read yet in the channel.

    Since

    3.0.103

    Declaration

    Swift

    @objc
    public internal(set) var unreadMentionCount: UInt { get }
  • Channel members

    Note

    Number of member for Super GroupChannel is limited to 10

    Declaration

    Swift

    @objc
    public var members: [Member] { get }
  • The number of members.

    Declaration

    Swift

    @objc
    public internal(set) var memberCount: UInt { get }
  • The number of joined members.

    Declaration

    Swift

    @objc
    public internal(set) var joinedMemberCount: UInt { get }
  • Timestamp when current user joined

    Since

    3.0.224

    Declaration

    Swift

    @objc
    public internal(set) var joinedAt: Int64 { get }
  • Represents which push notification for the current user to receive in a group channel.

    Since

    3.0.128

    Declaration

    Swift

    @objc
    public internal(set) var myPushTriggerOption: GroupChannelPushTriggerOption { get }
  • Represents this channel is hidden or not.

    Declaration

    Swift

    @objc
    public internal(set) var isHidden: Bool { get }
  • Current member’s state in the channel.

    Declaration

    Swift

    @objc
    public internal(set) var myMemberState: MemberState { get }
  • The role of current user in the channel.

    Declaration

    Swift

    @objc
    public internal(set) var myRole: Role { get }
  • The muted state of the current user in the channel.

    Declaration

    Swift

    @objc
    public internal(set) var myMutedState: MutedState { get }
  • The preference lets to know counts in the channel. The default value is .all.

    Since

    3.0.102

    Declaration

    Swift

    @objc
    public internal(set) var myCountPreference: CountPreference { get }
  • The time stamp when the current user got a invitation from other user in the channel.

    Since

    3.0.107

    Declaration

    Swift

    @objc
    public internal(set) var invitedAt: Int64 { get }
  • The hidden state of the channel.

    Since

    3.0.122

    Declaration

    Swift

    @objc
    public internal(set) var hiddenState: GroupChannelHiddenState { get }
  • A last read information for the current user.

    Since

    3.0.138

    Declaration

    Swift

    @objc
    public internal(set) var myLastRead: Int64 { get }
  • Message offset of a channel. User can only see messages after this offset.

    Since

    3.0.157

    Declaration

    Swift

    @objc
    public internal(set) var messageOffsetTimestamp: Int64 { get }
  • A value that sets the message survival time in seconds. In the channel that is created or updated with this option, the read messages are automatically deleted after a determined amount of time. The default value is -1 that represents the disappearing message is disabled.

    Note

    This feature is available in a 1-on-1 group channel.

    Since

    3.0.172

    Declaration

    Swift

    @objc
    public internal(set) var messageSurvivalSeconds: Int { get }
  • Checks if the channel has a member that has userId.

    Declaration

    Swift

    @objc
    public func hasMember(_ userId: String) -> Bool

    Parameters

    userId

    User ID.

    Return Value

    If true, the channel has the member.

  • Gets member in the channel.

    Declaration

    Swift

    @objc
    public func getMember(_ userId: String) -> Member?

    Parameters

    userId

    User ID.

    Return Value

    Member object as a member. If there is a member who has the userId, Returns nil.

  • Gets a user who invites current user to this channel

    Declaration

    Swift

    @objc
    public func getInviter() -> User?

    Return Value

    optional `User

  • Gets my delivery status in UTC timestamp

    Declaration

    Swift

    @objc
    public func myDeliveryStatus() -> Int64
  • Compares two channel objects with the channel list order.

    Since

    3.0.227

    Declaration

    Swift

    @objc
    public class func compare(
        channelA: GroupChannel,
        channelB: GroupChannel,
        order: GroupChannelListOrder
    ) -> Bool

    Parameters

    channelA

    First channel object.

    channelB

    Second channel obejct.

    order

    Order.

  • Default constructor.

    Declaration

    Swift

    public required init(from decoder: Decoder) throws

    Parameters

    decoder

    Decoder instance

  • Encodes this object.

    Declaration

    Swift

    public override func encode(to encoder: Encoder) throws

    Parameters

    encoder

    Encoder instance

  • Compares this object with given other object.

    Declaration

    Swift

    public override func isEqual(_ object: Any?) -> Bool

    Parameters

    object

    Any instance

    Return Value

    true if same otherwise false

  • Refreshes this channel instance.

    Declaration

    Swift

    func refresh(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    The handler block to execute.

  • Creates a group channel with GroupChannelCreateParams class.

    Declaration

    Swift

    @objc(createChannelWithParams:completionHandler:)
    class func createChannel(
        params: GroupChannelCreateParams,
        completionHandler: GroupChannelHandler?
    )

    Parameters

    params

    The parameter instance of GroupChannelCreateParams what has properties to create group channel.

    completionHandler

    The handler block to execute. channel is the group channel instance which has the userIds as members.

  • Creates a group channel with GroupChannelCreateParams class.

    Since

    3.0.215

    Declaration

    Swift

    @objc(createChannelWithParams:progressHandler:completionHandler:)
    class func createChannel(
        params: GroupChannelCreateParams,
        progressHandler: ProgressHandler?,
        completionHandler: GroupChannelHandler?
    )

    Parameters

    params

    The parameter instance of GroupChannelCreateParams what has properties to create group channel.

    progressHandler

    The handler block to monitor progression. bytesSent is the number of bytes sent since the last time this method was called. totalBytesSent is the total number of bytes sent so far. totalBytesExpectedToSend is the expected length of the body data. These parameters are the same to the declaration of urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:).

    completionHandler

    The handler block to execute. channel is the group channel instance which has the userIds as members.

  • Creates a group channel with GroupChannelCreateParams class.

    The completionHandler Returns isCreated, which notifies the channel instance is created now.

    Since

    3.0.122

    Declaration

    Swift

    @objc(createDistinctChannelIfNotExistWithParams:completionHandler:)
    class func createDistinctChannelIfNotExist(
        params: GroupChannelCreateParams,
        completionHandler: @escaping DistinctGroupChannelHandler
    )

    Parameters

    params

    The parameter instance of GroupChannelCreateParams what has properties to create group channel. The channel that is created by this method is always a distinct channel regardless of the isDistinct value of the params.

    completionHandler

    The handler block to be executed. If the channel instance is new, then isCreated is true.

  • Creates a group channel with GroupChannelCreateParams class.

    The completionHandler Returns isCreated, which notifies the channel instance is created now.

    Since

    3.0.215

    Declaration

    Swift

    @objc(createDistinctChannelIfNotExistWithParams:progressHandler:completionHandler:)
    class func createDistinctChannelIfNotExist(
        params: GroupChannelCreateParams,
        progressHandler: ProgressHandler?,
        completionHandler: @escaping DistinctGroupChannelHandler
    )

    Parameters

    params

    The parameter instance of GroupChannelCreateParams what has properties to create group channel. The channel that is created by this method is always a distinct channel regardless of the isDistinct value of the params.

    progressHandler

    The handler block to monitor progression. bytesSent is the number of bytes sent since the last time this method was called. totalBytesSent is the total number of bytes sent so far. totalBytesExpectedToSend is the expected length of the body data. These parameters are the same to the declaration of urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:).

    completionHandler

    The handler block to be executed. If the channel instance is new, then isCreated is true.

Update Channel

  • Update a group channel with GroupChannelUpdateParams class.

    Declaration

    Swift

    @objc(updateChannelWithParams:completionHandler:)
    func update(
        params: GroupChannelUpdateParams,
        completionHandler: @escaping GroupChannelHandler
    )

    Parameters

    params

    instance of GroupChannelUpdateParams contains what to update for group channel.

    completionHandler

    The handler block to execute. channel is the group channel instance which has the userIds as members.

  • Update a group channel with GroupChannelUpdateParams class.

    Since

    3.0.215

    Declaration

    Swift

    @objc(updateChannelWithParams:progressHandler:completionHandler:)
    func update(
        params: GroupChannelUpdateParams,
        progressHandler: ProgressHandler?,
        completionHandler: @escaping GroupChannelHandler
    )

    Parameters

    params

    instance of GroupChannelUpdateParams contains what to update for group channel.

    progressHandler

    The handler block to monitor progression. bytesSent is the number of bytes sent since the last time this method was called. totalBytesSent is the total number of bytes sent so far. totalBytesExpectedToSend is the expected length of the body data. These parameters are the same to the declaration of urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:).

    completionHandler

    The handler block to execute. channel is the group channel instance which has the userIds as members.

  • Gets a group channel instance from channel URL asynchronously.

    Declaration

    Swift

    @objc(getChannelWithURL:completionHandler:)
    class func getChannel(url: String, completionHandler: GroupChannelHandler?)

    Parameters

    url

    The channel URL.

    completionHandler

    The handler block to execute. channel is the group channel instance which has the channelURL.

  • Deletes the group channel. The user has to be an operator of the channel.

    Since

    3.0.137

    Declaration

    Swift

    @objc(deleteChannelWithCompletionHandler:)
    func delete(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    The handler block to execute.

  • Resets the history in this channel.

    Declaration

    Swift

    func resetMyHistory(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    The handler block to execute.

  • Changes a setting that decides which push notification for the current user to receive in the group channel.

    If a value of option is .default, a push trigger option in this group channel follows a push trigger option of the current user. It is related with SendbirdChat setPushTriggerOption(_:completionHandler:).

    Since

    3.0.128

    Declaration

    Swift

    func setMyPushTriggerOption(
        _ option: GroupChannelPushTriggerOption,
        completionHandler: SBErrorHandler?
    )

    Parameters

    option

    options to choose which push notification for the current user to receive.

    completionHandler

    handler block to execute when setting a push trigger option of the current user is completed.

  • Requests a setting that decides which push notification for the current user to receive in the group channel.

    Since

    3.0.128

    Declaration

    Swift

    func getMyPushTriggerOption(completionHandler: @escaping GroupChannelPushTriggerOptionHandler)

    Parameters

    completionHandler

    The handler block to execute when getting a push trigger option of the current user is completed.

  • Sets count preference of current user.

    Since

    3.0.102

    Declaration

    Swift

    func setMyCountPreference(
        _ myCountPreference: CountPreference,
        completionHandler: SBErrorHandler?
    )

    Parameters

    myCountPreference

    Preference is type of CountPreference. The default value is .all.

  • Freeze the channel. If channel is frozen, only operators can send messages to the channel.

    Since

    3.0.89

    Declaration

    Swift

    func freeze(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    The handler block to be executed after freeze.

  • Stop to freeze the channel. If It is not frozen channel, this will be ignored.

    Since

    3.0.89

    Declaration

    Swift

    func unfreeze(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    The handler block to be executed after stop to freeze.

  • Invites a single user to the group channel.

    Declaration

    Swift

    func inviteUser(_ user: User, completionHandler: SBErrorHandler?)

    Parameters

    user

    The user to be invited.

    completionHandler

    The handler block to execute.

  • Invites a single user to the group channel.

    Declaration

    Swift

    func inviteUserId(_ userId: String, completionHandler: SBErrorHandler?)

    Parameters

    userId

    The user ID to be invited.

    completionHandler

    The handler block to execute.

  • Invites multiple users to the group channel.

    Declaration

    Swift

    func inviteUsers(_ users: [User], completionHandler: SBErrorHandler?)

    Parameters

    users

    The user array to be invited.

    completionHandler

    The handler block to execute.

  • Invites multiple users to the group channel.

    Declaration

    Swift

    func inviteUserIds(_ userIds: [String], completionHandler: SBErrorHandler?)

    Parameters

    userIds

    The IDs of users array to be invited.

    completionHandler

    The handler block to execute.

  • Accpets the invitation.

    Declaration

    Swift

    func acceptInvitation(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    The handler block to execute.

  • Accpets the invitation from a public group channel that has access code.

    Since

    3.0.116

    Declaration

    Swift

    func acceptInvitation(accessCode: String?, completionHandler: SBErrorHandler?)

    Parameters

    accessCode

    The string code is used to accept invitation from a public group channel.

    completionHandler

    The handler block to be executed after accepting. This block has no return value and takes an argument that is an error made when there is something wrong to accept.

  • Declines the invitation.

    Declaration

    Swift

    func declineInvitation(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    The handler block to execute.

  • Join a group channel

    Declaration

    Swift

    func join(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    The handler block to execute.

  • Join a public group channel that has access code.

    Since

    3.0.116

    Declaration

    Swift

    func join(accessCode: String?, completionHandler: SBErrorHandler?)

    Parameters

    accessCode

    The string code is used to join a public group channel.

    completionHandler

    The handler block to be executed after joining. This block has no return value and takes an argument that is an error made when there is something wrong to join.

  • Leaves the group channel. The channel will be disappeared from the channel list. If join the channel, the invitation is required.

    Declaration

    Swift

    @objc(leaveChannelWithCompletionHandler:)
    func leave(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    The handler block to execute.

  • Hides the group channel. The channel will be hid from the channel list, but it will be appeared again when the other user send a message in the channel.

    Declaration

    Swift

    @objc(hideChannelWithHidePreviousMessages:completionHandler:)
    func hide(
        hidePreviousMessages: Bool,
        completionHandler: SBErrorHandler?
    )

    Parameters

    hidePreviousMessages

    The option to hide the previous message of this channel when the channel will be appeared again.

    completionHandler

    The handler block to execute.

  • Hides the group channel with the auto unhide option. The channel will be hid from the channel list. If the allowAutoUnhide is true, the channel will be appeared again when the other user send a message in the channel. However, if the allowAutoUnhide is false, the channel will be appeared by unhideChannel(completionHandler:) method.

    Since

    3.0.122

    Declaration

    Swift

    @objc(hideChannelWithHidePreviousMessages:allowAutoUnhide:completionHandler:)
    func hide(
        hidePreviousMessages: Bool,
        allowAutoUnhide: Bool,
        completionHandler: SBErrorHandler?
    )

    Parameters

    hidePreviousMessages

    The option to hide the previous message of this channel when the channel will be appeared again.

    allowAutoUnhide

    The auto unhide option.

    completionHandler

    THe handle block to be executed.

  • Unhides the group channel.

    Since

    3.0.122

    Declaration

    Swift

    @objc(unhideChannelWithCompletionHandler:)
    func unhide(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    THe handle block to be executed.

  • Sends mark as read. The other members in the channel will receive an event. The event will be received in channelDidUpdateReadStatus: of GroupChannelDelegate.

    Declaration

    Swift

    @objc(markAsReadWithCompletionHandler:)
    func markAsRead(completionHandler: SBErrorHandler?)
  • Notifies the current user took a screenshot in this channel. The server is going to send an admin message to notify this in the group channel.

    Since

    3.0.172

    Declaration

    Swift

    func notifyScreenshotWasTaken(completionHandler: SBErrorHandler?)

    Parameters

    completionHandler

    The handler block to be executed.

  • Creates a query for my group channel list with default params.

    Declaration

    Swift

    @objc
    public class func createMyGroupChannelListQuery() -> GroupChannelListQuery

    Return Value

    GroupChannelListQuery instance for the current user.

  • Creates a query for my group channel list with paramsBuilder.

    Declaration

    Swift

    @objc
    public class func createMyGroupChannelListQuery(paramsBuilder: (GroupChannelListQueryParams) -> Void) -> GroupChannelListQuery

    Parameters

    paramsBuilder

    The builder closure for setting GroupChannelListQueryParams.

    Return Value

    GroupChannelListQuery instance for the current user.

  • Creates a query for my group channel list.

    Declaration

    Swift

    @objc
    public class func createMyGroupChannelListQuery(params: GroupChannelListQueryParams) -> GroupChannelListQuery

    Parameters

    params

    Return Value

    GroupChannelListQuery instance for the current user.

  • Creates a query for public group channel list.

    Declaration

    Swift

    @objc
    public class func createPublicGroupChannelListQuery() -> PublicGroupChannelListQuery

    Return Value

    The instance to query public group channels.

  • Creates a query for public group channel list.

    Declaration

    Swift

    @objc
    public class func createPublicGroupChannelListQuery(paramsBuilder: (PublicGroupChannelListQueryParams) -> Void) -> PublicGroupChannelListQuery

    Parameters

    paramsBuilder

    The builder closure for setting PublicGroupChannelListQueryParams.

    Return Value

    The instance to query public group channels.

  • Creates a query for public group channel list.

    Declaration

    Swift

    @objc
    public class func createPublicGroupChannelListQuery(params: PublicGroupChannelListQueryParams) -> PublicGroupChannelListQuery

    Parameters

    params

    The params object to change query condition.

    Return Value

    The instance to query public group channels.

  • Creates a query for members in group channel.

    Declaration

    Swift

    @objc
    public class func createMemberListQuery(channelURL: String) -> MemberListQuery

    Parameters

    channelURL

    channel url

    Return Value

    The instance to query the members in group channel.

  • Creates a query for members in group channel.

    Declaration

    Swift

    @objc
    public class func createMemberListQuery(channelURL: String, paramsBuilder: (MemberListQueryParams) -> Void) -> MemberListQuery

    Parameters

    channelURL

    channel url

    paramsBuilder

    The builder closure for setting MemberListQueryParams.

    Return Value

    The instance to query the members in group channel.

  • Creates a query for members in group channel.

    Declaration

    Swift

    @objc
    public func createMemberListQuery() -> MemberListQuery?

    Parameters

    params

    The params object to change query condition.

    Return Value

    The instance to query the members in group channel.

  • Creates a query for members in group channel.

    Declaration

    Swift

    @objc
    public func createMemberListQuery(paramsBuilder: (MemberListQueryParams) -> Void) -> MemberListQuery?

    Parameters

    paramsBuilder

    The builder closure for setting MemberListQueryParams.

    Return Value

    The instance to query the members in group channel.

  • Creates a query for members in group channel.

    Declaration

    Swift

    @objc
    public func createMemberListQuery(params: MemberListQueryParams) -> MemberListQuery?

    Parameters

    params

    The params object to change query condition.

    Return Value

    The instance to query the members in group channel.

  • Returns how many members haven’t been read the given message yet.

    Since

    3.0.185

    Declaration

    Swift

    func getUnreadMemberCount(_ message: BaseMessage) -> Int

    Parameters

    message

    The message.

    Return Value

    Number of unread member count. Zero if all members read the message.

  • Returns the members who read the given message.

    Since

    3.0.115

    Declaration

    Swift

    @objc(getReadMembersWithMessage:includeAllMembers:)
    func getReadMembers(
        message: BaseMessage,
        includeAllMembers: Bool
    ) -> [Member]

    Parameters

    message

    The message.

    includeAllMembers

    If true, the return value includes the current user and the sender of the message.

    Return Value

    Members who read the message.

  • Returns the members who didn’t read the given message.

    Since

    3.0.115

    Declaration

    Swift

    @objc(getUnreadMembersWithMessage:includeAllMembers:)
    func getUnreadMembers(
        message: BaseMessage,
        includeAllMembers: Bool
    ) -> [Member]

    Parameters

    message

    The message.

    includeAllMembers

    If true, the return value includes the current user and the sender of the message.

    Return Value

    Members who don’t read the message.

  • Returns how many members haven’t been delivery the given message yet.

    Since

    3.0.185

    Declaration

    Swift

    func getUndeliveredMemberCount(_ message: BaseMessage) -> Int

    Parameters

    message

    The message.

    Return Value

    Number of undelivered member count. Zero if all members delivered the message.

  • Returns the read status.

    Since

    3.0.115

    [ USER_ID: [ “user”: User object, “last_seen_at”: Int64, ] ]

    USER_ID is the user ID as a key. Each USER_ID has a Dictionary which includes User object and Int64. The “user” is a key of User object and the “last_seen_at” is a key of Int64 object.

    Declaration

    Swift

    @objc(getReadStatusIncludingAllMembers:)
    func getReadStatus(includeAllMembers: Bool) -> [String : [String : Any]]

    Parameters

    includeAllMembers

    If true, the return value includes the current user and the sender of the message.

    Return Value

    The read status. If there’s no data, it will be an empty dictionary.

  • Creates a file message to be sent at the specified time.

    Note

    If a user leaves before sending scheduled messages, the scheduled messages will be removed.

    Since

    4.0.0

    Declaration

    Swift

    @objc(createScheduledFileMessageWithParams:completionHandler:)
    public func createScheduledFileMessage(
        params: ScheduledFileMessageCreateParams,
        completionHandler: FileMessageHandler?
    )

    Parameters

    params

    The instance of ScheduledFileMessageCreateParams that can has parameters related with file message.

    completionHandler

    The handler block to be executed after the message is registered in the schedule. This block has no return value and takes two argument, one is a user message is registered in the schedule and other is an error made when there is something wrong to message.

  • Updates a scheduled file message.

    Note

    If a user leaves before sending scheduled messages, the scheduled messages will be removed.

    Since

    4.0.0

    Declaration

    Swift

    @objc(updateScheduledFileMessageWithScheduledMessageId:params:completionHandler:)
    public func updateScheduledFileMessage(
        scheduledMessageId: Int64,
        params: ScheduledFileMessageUpdateParams,
        completionHandler: FileMessageHandler?
    )

    Parameters

    scheduledMessageId

    The scheduled message ID.

    params

    The instance of ScheduledFileMessageUpdateParams that can has parameters related with file message.

    completionHandler

    The handler block to be executed after the message is registered in the schedule. This block has no return value and takes two argument, one is a user message is registered in the schedule and other is an error made when there is something wrong to message.

  • Sends the scheduled message now.

    Since

    4.0.0

    Declaration

    Swift

    @objc
    public func sendScheduledMessageNow(
        scheduledMessageId: Int64,
        completionHandler: @escaping SBErrorHandler
    )

    Parameters

    scheduledMessageId

    The scheduled message ID.

    completionHandler

    The handler block to be executed after sending the scheduled message or when an error occurs.

  • Cancels the scheduled message.

    Since

    4.0.0

    Declaration

    Swift

    @objc
    public func cancelScheduledMessage(
        scheduledMessageId: Int64,
        completionHandler: @escaping SBErrorHandler
    )

    Parameters

    scheduledMessageId

    The scheduled message ID.

    completionHandler

    The handler block to be executed after canceling the scheduled message or when an error occurs.

  • Creates a user message to be sent at the specified time.

    Note

    If a user leaves before sending scheduled messages, the scheduled messages will be removed.

    Since

    4.0.0

    Declaration

    Swift

    @objc(createScheduledUserMessageWithParams:completionHandler:)
    public func createScheduledUserMessage(
        params: ScheduledUserMessageCreateParams,
        completionHandler: UserMessageHandler?
    )

    Parameters

    params

    The instance of ScheduledUserMessageCreateParams that can has parameters related with string message.

    completionHandler

    The handler block to be executed after the message is registered in the schedule. This block has no return value and takes two argument, one is a user message is registered in the schedule and other is an error made when there is something wrong to message.

  • Updates a user message to be sent at the specified time.

    Note

    If a user leaves before sending scheduled messages, the scheduled messages will be removed.

    Since

    4.0.0

    Declaration

    Swift

    @objc(updateScheduledUserMessageWithScheduledMessageId:userMessageParams:completionHandler:)
    public func updateScheduledUserMessage(
        scheduledMessageId: Int64,
        params: ScheduledUserMessageUpdateParams,
        completionHandler: UserMessageHandler?
    )

    Parameters

    scheduledMessageId

    The scheduled message ID.

    params

    The instance of ScheduledUserMessageUpdateParams that can has parameters related with string message.

    completionHandler

    The handler block to be executed after the message is registered in the schedule. This block has no return value and takes two argument, one is a user message is registered in the schedule and other is an error made when there is something wrong to message.

  • Starts typing. The other members in the channel will receive an event.

    The event will be received in channelDidUpdateTypingStatus(_:) of GroupChannelDelegate.

    Declaration

    Swift

    func startTyping()
  • Ends typing. The other members in the channel will receive an event.

    The event will be received in channelDidUpdateTypingStatus(_:) of GroupChannelDelegate.

    Declaration

    Swift

    func endTyping()
  • Checks any members in the channel has been typing

    Declaration

    Swift

    func isTyping() -> Bool

    Return Value

    true when other users are typing in this channel.

  • Returns the users who are typing now.

    Since

    3.0.202

    Declaration

    Swift

    func getTypingUsers() -> [User]?

    Return Value

    The users who are typing now.

  • Deserializes and reconstructs the object

    Declaration

    Swift

    public override class func build(fromSerializedData data: Data?) -> `Self`?

    Parameters

    data

    Data instance

    Return Value

    GroupChannel if parameter is valid, otherwise nil