GroupChannel
open 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
open internal(set) var lastMessage: BaseMessage?
-
Represents the channel is super channel or not.
Declaration
Swift
open internal(set) var isSuper: Bool
-
Represents the channel is broadcast channel or not.
Since
3.0.171Declaration
Swift
open internal(set) var isBroadcast: Bool
-
Represents the channel is exclusive channel or not.
Since
4.0.0Declaration
Swift
open internal(set) var isExclusive: Bool
-
Represents the channel is public channel or private one.
Declaration
Swift
open internal(set) var isPublic: Bool
-
Represents that the channel has access code to enter.
Since
3.0.116Declaration
Swift
open internal(set) var isAccessCodeRequired: Bool
-
Represents the channel is distinct or not.
Declaration
Swift
open internal(set) var isDistinct: Bool
-
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 isfalse
.Since
3.0.136Declaration
Swift
open internal(set) var isDiscoverable: Bool
-
Since
4.6.0Declaration
Swift
open internal(set) var isConversation: Bool
-
Since
4.6.0Declaration
Swift
open internal(set) var isChatNotification: Bool
-
Unread message count of the channel.
Declaration
Swift
open internal(set) var unreadMessageCount: UInt
-
The number of mentions that user does not read yet in the channel.
Since
3.0.103Declaration
Swift
open internal(set) var unreadMentionCount: UInt
-
Channel members
Note
Number of member for Super GroupChannel is limited to 10Declaration
Swift
open var members: [Member]
-
The number of members.
Declaration
Swift
open internal(set) var memberCount: UInt = 0
-
The number of joined members.
Declaration
Swift
open internal(set) var joinedMemberCount: UInt = 0
-
Timestamp when current user joined
Since
3.0.224Declaration
Swift
open internal(set) var joinedAt: Int64 = 0
-
Represents which push notification for the current user to receive in a group channel.
Since
3.0.128Declaration
Swift
open internal(set) var myPushTriggerOption: GroupChannelPushTriggerOption = .all
-
Represents this channel is hidden or not.
Declaration
Swift
open internal(set) var isHidden: Bool = false
-
The hidden state of the channel.
Since
3.0.122Declaration
Swift
open internal(set) var hiddenState: GroupChannelHiddenState = .unhidden
-
Current member’s state in the channel.
Declaration
Swift
open internal(set) var myMemberState: MemberState = .none
-
The role of current user in the channel.
Declaration
Swift
open internal(set) var myRole: Role = .none
-
The muted state of the current user in the channel.
Declaration
Swift
open internal(set) var myMutedState: MutedState = .unmuted
-
The preference lets to know counts in the channel. The default value is
.all
.Since
3.0.102Declaration
Swift
open internal(set) var myCountPreference: CountPreference
-
The time stamp when the current user got a invitation from other user in the channel.
Since
3.0.107Declaration
Swift
open internal(set) var invitedAt: Int64 = 0
-
A last read information for the current user.
Since
3.0.138Declaration
Swift
open internal(set) var myLastRead: Int64 = 0
-
Message offset of a channel. User can only see messages after this offset.
Since
3.0.157Declaration
Swift
open var messageOffsetTimestamp: Int64
-
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.172Declaration
Swift
open internal(set) var messageSurvivalSeconds: Int = -1
-
Indicates whether this channel includes any AI bots.
Since
4.20.0Declaration
Swift
open internal(set) var hasAIBot: Bool = false
-
Indicates whether this channel includes any bots.
Since
4.20.0Declaration
Swift
open internal(set) var hasBot: Bool = false
-
Checks if the channel has a member that has
userId
.Declaration
Swift
open func hasMember(_ userId: String) -> Bool
Parameters
userId
User ID.
Return Value
If
true
, the channel has the member. -
Gets a user who invites current user to this channel
Declaration
Swift
open func getInviter() -> User?
Return Value
optional `User
-
Gets my delivery status in UTC timestamp
Declaration
Swift
open func myDeliveryStatus() -> Int64
-
Compares two channel objects with the channel list order.
Since
3.0.227Declaration
Swift
open 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
instanceReturn Value
true
if same otherwisefalse
-
Refreshes this channel instance.
Declaration
Swift
open func refresh(completionHandler: SBErrorHandler?)
Parameters
completionHandler
The handler block to execute.
-
Creates a group channel with
GroupChannelCreateParams
class.Declaration
Swift
open 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 theuserIds
as members. -
Creates a group channel with
GroupChannelCreateParams
class.Since
3.0.215Declaration
Swift
open 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 ofurlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)
.completionHandler
The handler block to execute.
channel
is the group channel instance which has theuserIds
as members. -
Creates a group channel with
GroupChannelCreateParams
class.The
completionHandler
ReturnsisCreated
, which notifies thechannel
instance is created now.Since
3.0.122Declaration
Swift
open 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 theisDistinct
value of theparams
.completionHandler
The handler block to be executed. If the
channel
instance is new, thenisCreated
istrue
. -
Creates a group channel with
GroupChannelCreateParams
class.The
completionHandler
ReturnsisCreated
, which notifies thechannel
instance is created now.Since
3.0.215Declaration
Swift
open 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 theparams
.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 ofurlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)
.completionHandler
The handler block to be executed. If the
channel
instance is new, thenisCreated
istrue
.
-
Update a group channel with
GroupChannelUpdateParams
class.Declaration
Swift
open 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 theuserIds
as members. -
Update a group channel with
GroupChannelUpdateParams
class.Since
3.0.215Declaration
Swift
open 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 ofurlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)
.completionHandler
The handler block to execute.
channel
is the group channel instance which has theuserIds
as members. -
Gets a group channel instance from channel URL asynchronously.
Declaration
Swift
open 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 thechannelURL
. -
Deletes the group channel. The user has to be an operator of the channel.
Since
3.0.137Declaration
Swift
open func delete(completionHandler: SBErrorHandler?)
Parameters
completionHandler
The handler block to execute.
-
Sends a multipleFilesMessage with files (file or file URL) of params.
For binary files in params.files, the data will be uploaded to Sendbird storage. For URL files in params.files, the URLs will be sent in the message.
Declaration
Swift
public func sendMultipleFilesMessage( params: MultipleFilesMessageCreateParams, fileUploadHandler: FileUploadHandler?, completionHandler: @escaping MultipleFilesMessageHandler ) -> MultipleFilesMessage?
Parameters
params
An intance of
MultipleFilesMessageCreateParams
that contains parameters needed to create a MultipleFilesMessage.fileUploadHandler
A handler block to be executed after each file is uploaded. This block has no return value, and takes four arguments: first is requestId of a file, second is the index of a file, third is the UploadableFileInfo, and the fourth is the error made when there is a problem in uploading the file. This handler is called for both file-based UploadableFileInfo and file URL-based UploadableFileInfo.
completionHandler
A handler block to be executed after the message is sent. This block has no return value, and takes two arguments: one is a multipleFilesMessage that is sent, and the other is an error made when there is a problem in sending the message.
Return Value
A temporary multipleFilesMessage being sent to the Sendbird server. The sending status of the message is
pending
. The message has a request ID instead of a message ID.
-
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.0Declaration
Swift
open func createScheduledFileMessage( params: ScheduledFileMessageCreateParams, completionHandler: FileMessageHandler? ) -> FileMessage?
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.0Declaration
Swift
open 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.
-
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.2Declaration
Swift
open func createScheduledUserMessage( params: ScheduledUserMessageCreateParams, completionHandler: UserMessageHandler? ) -> UserMessage?
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.0Declaration
Swift
open 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.
-
Sends the scheduled message now.
Since
4.0.0Declaration
Swift
open 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.0Declaration
Swift
open 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.
-
Copies a multiple files message to the target channel.
Since
4.10.0Declaration
Swift
public func copyMultipleFilesMessage( _ message: MultipleFilesMessage, toTargetChannel targetChannel: GroupChannel, completionHandler: MultipleFilesMessageHandler? ) -> MultipleFilesMessage?
Parameters
message
MultipleFilesMessage
object.targetChannel
GroupChannel
object that wants to copy themessage
.completionHandler
The handler block to execute when the copying is completed.
Return Value
The temporary
MultipleFilesMessage
object that contains a request ID instead of a message ID. If there’s any error,nil
could be returned.
-
Attempts to resend a failed mutiple files message.
Since
4.10.0Declaration
Swift
public func resendMultipleFilesMessage( _ message: MultipleFilesMessage, fileUploadHandler: FileUploadHandler?, completionHandler: MultipleFilesMessageHandler? ) -> MultipleFilesMessage?
Parameters
message
MultipleFilesMessage
object to resend.fileUploadHandler
A handler block to execute after each file is uploaded. This block takes four arguments: the requestId of a file, the index of a file,
UploadableFileInfo
object, and the errorcompletionHandler
The handler block to excute when the sending is completed. When the sending is failed, the parameter represents the failed message.
completionHandler
The handler block to excute when the sending is completed. When the sending is failed, the parameter represents the failed message.
Return Value
A temporary
MultipleFilesMessage
object being sent to the Sendbird server.
-
Returns the delivery status as objects.
[{USER_ID}: DeliveryStatus]
USER_ID
is the user ID as a key. EachUSER_ID
has aDictionary
which includesMember
object andInt64
. The “user” is a key ofMember
object and the “timestamp” is a key ofInt64
object.Since
4.12.2Declaration
Swift
public func getDeliveryStatus(with includeAllMembers: Bool) -> [String: DeliveryStatus]
Parameters
includeAllMembers
If true, the return value includes the current user and the sender of the message.
Return Value
The delivery status. If there is no data, it will not be added to the dictionary.
-
Freeze the channel. If channel is frozen, only operators can send messages to the channel.
Since
3.0.89Declaration
Swift
open 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.89Declaration
Swift
open 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
open 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
open 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
open 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
open 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
open 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.116Declaration
Swift
open 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
open func declineInvitation(completionHandler: SBErrorHandler?)
Parameters
completionHandler
The handler block to execute.
-
Join a group channel
Declaration
Swift
open func join(completionHandler: SBErrorHandler?)
Parameters
completionHandler
The handler block to execute.
-
Join a public group channel that has access code.
Since
3.0.116Declaration
Swift
open 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
open func leave(completionHandler: SBErrorHandler?)
Parameters
completionHandler
The handler block to execute.
-
Leaves the group channel. The channel will be disappeared from the channel list. If join the channel, the invitation is required.
Since
4.0.9Declaration
Swift
open func leave(shouldRemoveOperatorStatus: Bool, completionHandler: SBErrorHandler?)
Parameters
shouldRemoveOperatorStatus
Set to true if you want the operator to remove the state when they leaves. Default is
false
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
open 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
istrue
, the channel will be appeared again when the other user send a message in the channel. However, if theallowAutoUnhide
isfalse
, the channel will be appeared byunhideChannel(completionHandler:)
method.Since
3.0.122Declaration
Swift
open 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.122Declaration
Swift
open 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:
ofGroupChannelDelegate
.Declaration
Swift
open func markAsRead(completionHandler: SBErrorHandler?)
Parameters
completionHandler
completion handler
-
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.172Declaration
Swift
open func notifyScreenshotWasTaken(completionHandler: SBErrorHandler?)
Parameters
completionHandler
The handler block to be executed.
-
Returns how many members haven’t been read the given message yet.
Since
3.0.185Declaration
Swift
open 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.115Declaration
Swift
open 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.115Declaration
Swift
open 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.185Declaration
Swift
open 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. EachUSER_ID
has aDictionary
which includesUser
object andInt64
. The “user” is a key ofUser
object and the “last_seen_at” is a key ofInt64
object.Declaration
Swift
open 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.
-
Returns the read status as objects.
[{USER_ID}: ReadStatus]
USER_ID
is the user ID as a key. EachUSER_ID
has aDictionary
which includesUser
object andInt64
. The “user” is a key ofUser
object and the “last_seen_at” is a key ofInt64
object.Since
4.12.2Declaration
Swift
public func getReadStatus(with includeAllMembers: Bool) -> [String: ReadStatus]
Parameters
includeAllMembers
If true, the return value includes the current user and the sender of the message.
Return Value
The read status. If there is no data, it will not be added to the dictionary.
-
Starts typing. The other members in the channel will receive an event.
The event will be received in
channelDidUpdateTypingStatus(_:)
ofGroupChannelDelegate
.Declaration
Swift
open func startTyping()
-
Ends typing. The other members in the channel will receive an event.
The event will be received in
channelDidUpdateTypingStatus(_:)
ofGroupChannelDelegate
.Declaration
Swift
open func endTyping()
-
Checks any members in the channel has been typing
Declaration
Swift
open func isTyping() -> Bool
Return Value
true
when other users are typing in this channel. -
Returns the users who are typing now.
Since
3.0.202Declaration
Swift
open func getTypingUsers() -> [User]?
Return Value
The users who are typing now.
-
Resets the history in this channel.
Declaration
Swift
open 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 withSendbirdChat setPushTriggerOption(_:completionHandler:)
.Since
3.0.128Declaration
Swift
open 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.128Declaration
Swift
open 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.102Declaration
Swift
open func setMyCountPreference( _ myCountPreference: CountPreference, completionHandler: SBErrorHandler? )
Parameters
myCountPreference
Preference is type of
CountPreference
. The default value is.all
.
-
Creates a query for my group channel list with default params.
Declaration
Swift
open class func createMyGroupChannelListQuery() -> GroupChannelListQuery
Return Value
GroupChannelListQuery instance for the current user.
-
Creates a query for my group channel list with paramsBuilder.
Declaration
Swift
open 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
open 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
open class func createPublicGroupChannelListQuery() -> PublicGroupChannelListQuery
Return Value
The instance to query public group channels.
-
Creates a query for public group channel list.
Declaration
Swift
open 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
open 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
open 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
open 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
open func createMemberListQuery() -> MemberListQuery?
Return Value
The instance to query the members in group channel.
-
Creates a query for members in group channel.
Declaration
Swift
open 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
open 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.
-
Deserializes and reconstructs the object
Declaration
Swift
open override class func build(fromSerializedData data: Data?) -> Self?
Parameters
data
Data
instanceReturn Value
GroupChannel
if parameter is valid, otherwisenil