Protocols

The following protocols are available globally.

  • An object that adopts the BaseChannelDelegate protocol is responsible for receiving the events in the channel. Delegate methods in BaseChannelDelegate are common for the BaseChannel. Exclusive delegate methods for OpenChannel and GroupChannel can be found in OpenChannelDelegate and GroupChannelDelegate. You must use OpenChannelDelegate and GroupChannelDelegate instead of using BaseChannelDelegate by using add(_:identifier:) in SendbirdChat.

    Warning

    If the object that adopts the BaseChannelDelegate protocol is invalid, the delegate has to be removed by the identifier via removeChannelDelegate(forIdentifier:) in SendbirdChat.

    This protocol deals with the below events.

    • Receives a message in the BaseChannel.
    • Receives an event when a message is updated in the BaseChannel.
    • Receives an event when the property of the BaseChannel was changed.
    • Receives an event when the BaseChannel was deleted.
    • Receives an event when a message in the BaseChannel was deleted.
    • Receives an event when meta data in the BaseChannel was changed.
    • Receives an event when meta counters in the BaseChannel were changed.
    • Receives an event when a group channel was hidden.
    • Receives an event when a user was muted or unmuted in the BaseChannel.
    • Receives an event when a user was banned or unbanned in the BaseChannel.
    • Receives an event when operators are updated.
    • Receives an event when a reaction of message in a channel was updated.
    See more

    Declaration

    Swift

    @objc(SBDBaseChannelDelegate)
    public protocol BaseChannelDelegate
  • An object that adopts the GroupChannelDelegate protocol is responsible for receiving the events in the channel.

    This protocol deals with the below events.

    • Receives an event when a member read a message in the GroupChannel.
    • Receives an event when a member typed something in the GroupChannel.
    • Receives an event when a new member joined the GroupChannel.
    • Receives an event when a member left from the GroupChannel.
    • Receives an event when a group channel was hidden.
    See more

    Declaration

    Swift

    @objc(SBDGroupChannelDelegate)
    public protocol GroupChannelDelegate : BaseChannelDelegate
  • An object that adopts the OpenChannelDelegate protocol is responsible for receiving the events in the channel.

    This protocol deals with the below events.

    • Receives an event when a participant entered the OpenChannel.
    • Receives an event when a participant exited the OpenChannel.
    • Receives an event when the OpenChannel was frozen or unfrozen.
    See more

    Declaration

    Swift

    @objc(SBDOpenChannelDelegate)
    public protocol OpenChannelDelegate : BaseChannelDelegate
  • Mappable protocol to initialize sendbird object from a given dictionary.

    Note

    This is legacy method for objective c and recommend to use Codable protocol for swift
    See more

    Declaration

    Swift

    @objc
    public protocol Mappable
  • Protocol to provide serialization

    See more

    Declaration

    Swift

    @objc
    public protocol Serializable
  • Represents a delegate to receive connection relates events

    See more

    Declaration

    Swift

    @objc(SBDConnectionDelegate)
    public protocol ConnectionDelegate
  • Represents a delegate to receive network event

    See more

    Declaration

    Swift

    @objc(SBDNetworkDelegate)
    public protocol NetworkDelegate
  • Represents a delegate to receive session relates events

    See more

    Declaration

    Swift

    @objc(SBDSessionDelegate)
    public protocol SessionDelegate
  • Methods that are invoked when the event of the channel collection occurs.

    Since

    3.0.227
    See more

    Declaration

    Swift

    @objc(SBDGroupChannelCollectionDelegate)
    public protocol GroupChannelCollectionDelegate
  • Methods that are invoked when the event of the message collection occurs.

    Since

    3.1.0
    See more

    Declaration

    Swift

    @objc(SBDMessageCollectionDelegate)
    public protocol MessageCollectionDelegate
  • Undocumented

    See more

    Declaration

    Swift

    public protocol SBErrorCode : Error
  • Undocumented

    See more

    Declaration

    Swift

    @objc(SBDUserListQuery)
    public protocol UserListQuery
  • Undocumented

    See more

    Declaration

    Swift

    public protocol RestrictedUserListQuery : AnyObject
  • Represents a delegate to receive user relates events

    See more

    Declaration

    Swift

    @objc(SBDUserEventDelegate)
    public protocol UserEventDelegate