SBDGroupChannel Class Reference

Inherits from SBDBaseChannel : NSObject
Declared in SBDGroupChannel.h

Overview

The SBDGroupChannel 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 SBDBaseChannel. If the SBDChannelDelegate is added, the user will automatically receive all messages from the group channels where the user belongs after connection. The SBDGroupChannel 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 SBDGroupChannel 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.

  lastMessage

Last message of the channel.

@property (strong, nonatomic, nullable) SBDBaseMessage *lastMessage

Declared In

SBDGroupChannel.h

  isSuper

Represents the channel is super channel or not. NO by default.

@property (nonatomic, setter=setSuper:) BOOL isSuper

Declared In

SBDGroupChannel.h

  isPublic

Represents the channel is public channel or private one. NO by default.

@property (nonatomic, setter=setPublic:) BOOL isPublic

Declared In

SBDGroupChannel.h

  accessCodeRequired

Represents that the channel has access code to enter.

@property (atomic, readonly, getter=isAccessCodeRequired) BOOL accessCodeRequired

Availability

3.0.116

Declared In

SBDGroupChannel.h

  isDistinct

Represents the channel is distinct or not.

@property (atomic) BOOL isDistinct

Declared In

SBDGroupChannel.h

  discoverable

Represents a boolean whether the public group channel is discoverable. It is only for a public group channel. The default value is YES(true) if the channel is a public group channel. If the channel is not a public group channel, the default value is NO(false).

@property (nonatomic, readonly, getter=isDiscoverable) BOOL discoverable

Availability

3.0.136

Declared In

SBDGroupChannel.h

  unreadMessageCount

Unread message count of the channel.

@property (nonatomic) NSUInteger unreadMessageCount

Declared In

SBDGroupChannel.h

  unreadMentionCount

The number of mentions that user does not read yet in the channel.

@property (nonatomic, readonly) NSUInteger unreadMentionCount

Availability

3.0.103

Declared In

SBDGroupChannel.h

  members

Channel members.

@property (strong, nonatomic, readonly, nullable) NSMutableArray<SBDMember*> *members

Declared In

SBDGroupChannel.h

  memberCount

The number of members.

@property (atomic, readonly) NSUInteger memberCount

Declared In

SBDGroupChannel.h

  joinedMemberCount

The number of joined members.

@property (atomic, readonly) NSUInteger joinedMemberCount

Declared In

SBDGroupChannel.h

  sendMarkAsReadEnable

The flag for sending mark as read. (Deprecated: in v3.0.42.)

@property (atomic) BOOL sendMarkAsReadEnable

Declared In

SBDGroupChannel.h

  isPushEnabled

Represents push notification is on or off. If true, push notification is on. (Deprecated: in v3.0.128)

@property (atomic, readonly) BOOL isPushEnabled

Declared In

SBDGroupChannel.h

  myPushTriggerOption

Represents which push notification for the current user to receive in a group channel.

@property (atomic, readonly) SBDGroupChannelPushTriggerOption myPushTriggerOption

Availability

3.0.128

Declared In

SBDGroupChannel.h

  isHidden

Represents this channel is hidden or not.

@property (atomic) BOOL isHidden

Declared In

SBDGroupChannel.h

  myMemberState

Current member’s state in the channel.

@property (atomic) SBDMemberState myMemberState

Declared In

SBDGroupChannel.h

  myRole

The role of current user in the channel.

@property (atomic, readonly) SBDRole myRole

Declared In

SBDGroupChannel.h

  myMutedState

The muted state of the current user in the channel.

@property (atomic, readonly) SBDMutedState myMutedState

Declared In

SBDGroupChannel.h

  myCountPreference

The preference lets to know counts in the channel. The default value is SBDCountPreferenceAll.

@property (atomic, readonly) SBDCountPreference myCountPreference

Availability

3.0.102

Declared In

SBDGroupChannel.h

  invitedAt

The time stamp when the current user got a invitation from other user in the channel.

@property (atomic, readonly) long long invitedAt

Availability

3.0.107

Declared In

SBDGroupChannel.h

  hiddenState

The hidden state of the channel.

@property (atomic, readonly) SBDGroupChannelHiddenState hiddenState

Availability

3.0.122

Declared In

SBDGroupChannel.h

  myLastRead

A last read information for the current user.

@property (nonatomic, readonly) long long myLastRead

Availability

3.0.138

Declared In

SBDGroupChannel.h

– init

DO NOT USE this initializer. You can only get an instance type of SBDGroupChannel from SDK.

- (nullable instancetype)init

Declared In

SBDGroupChannel.h

– refreshWithCompletionHandler:

Refreshes this channel instance.

- (void)refreshWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– initWithDictionary:

Initializes this channel instance with dictionary of group channel.

- (nullable instancetype)initWithDictionary:(NSDictionary *_Nonnull)dict

Parameters

dict

The dictionary of group channel.

Return Value

The instance of group channel.

Declared In

SBDGroupChannel.h

+ createMyGroupChannelListQuery

Creates a query for my group channel list.

+ (nullable SBDGroupChannelListQuery *)createMyGroupChannelListQuery

Return Value

SBDGroupChannelListQuery instance for the current user.

Declared In

SBDGroupChannel.h

+ createPublicGroupChannelListQuery

Creates a query for public group channel list.

+ (nullable SBDPublicGroupChannelListQuery *)createPublicGroupChannelListQuery

Return Value

SBDPublicGroupChannelListQuery The instance to query public group channels.

Declared In

SBDGroupChannel.h

– createMemberListQuery

Creates a query for members in group channel list.

- (nullable SBDGroupChannelMemberListQuery *)createMemberListQuery

Return Value

SBDGroupChannelMemberListQuery The instance of the members in group channel.

Declared In

SBDGroupChannel.h

– createBannedUserListQuery

Creates a query instance for banned user list of the channel.

- (nullable SBDBannedUserListQuery *)createBannedUserListQuery

Return Value

SBDUserListQuery The instance for the banned user list. Query only banned user list.

Availability

3.0.89

Declared In

SBDGroupChannel.h

+ createChannelWithUsers:isDistinct:completionHandler:

Creates a group channel with user objects.

+ (void)createChannelWithUsers:(NSArray<SBDUser*> *_Nonnull)users isDistinct:(BOOL)isDistinct completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

users

The users to be members of the channel.

isDistinct

If YES, the channel which has the same users is returned.

completionHandler

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

Declared In

SBDGroupChannel.h

+ createChannelWithUserIds:isDistinct:completionHandler:

Creates a group channel with user IDs.

+ (void)createChannelWithUserIds:(NSArray<NSString*> *_Nonnull)userIds isDistinct:(BOOL)isDistinct completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

userIds

The user IDs to be members of the channel.

isDistinct

If YES, the channel which has the same users is returned.

completionHandler

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

Declared In

SBDGroupChannel.h

+ createChannelWithName:users:coverUrl:data:completionHandler:

Creates a group channel with user objects. (Deprecated: in 3.0.116 Use createChannelWithParams:completionHandler: instead.)

+ (void)createChannelWithName:(NSString *_Nullable)name users:(NSArray<SBDUser*> *_Nonnull)users coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

users

The users to be members of the channel.

coverUrl

The cover image url of group channel.

data

The custom data of group channel.

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

+ createChannelWithName:users:coverImage:coverImageName:data:progressHandler:completionHandler:

Creates a group channel with user objects. (Deprecated: in 3.0.116 Use createChannelWithParams:completionHandler: instead.)

+ (void)createChannelWithName:(NSString *_Nullable)name users:(NSArray<SBDUser*> *_Nonnull)users coverImage:(NSData *_Nonnull)coverImage coverImageName:(NSString *_Nonnull)coverImageName data:(NSString *_Nullable)data progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

users

The users to be members of the channel.

coverImage

The cover image data of group channel.

coverImageName

The cover image file name of group channel.

data

The custom data of 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.

Declared In

SBDGroupChannel.h

+ createChannelWithName:userIds:coverUrl:data:completionHandler:

Create a group channel with user IDs. The group channel is distinct. (Deprecated: in 3.0.116 Use createChannelWithParams:completionHandler: instead.)

+ (void)createChannelWithName:(NSString *_Nullable)name userIds:(NSArray<NSString*> *_Nonnull)userIds coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

userIds

The user IDs to be members of the channel.

coverUrl

The cover image url of group channel.

data

The custom data of group channel.

completionHandler

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

Declared In

SBDGroupChannel.h

+ createChannelWithName:userIds:coverImage:coverImageName:data:progressHandler:completionHandler:

Create a group channel with user IDs. The group channel is distinct. (Deprecated: in 3.0.116 Use createChannelWithParams:completionHandler: instead.)

+ (void)createChannelWithName:(NSString *_Nullable)name userIds:(NSArray<NSString*> *_Nonnull)userIds coverImage:(NSData *_Nonnull)coverImage coverImageName:(NSString *_Nonnull)coverImageName data:(NSString *_Nullable)data progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

userIds

The user IDs to be members of the channel.

coverImage

The cover image data of group channel.

coverImageName

The cover image file name of group channel.

data

The custom data of 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.

Declared In

SBDGroupChannel.h

+ createChannelWithName:isDistinct:users:coverUrl:data:completionHandler:

Creates a group channel with user objects. The group channel is distinct. (Deprecated: in 3.0.116 Use createChannelWithParams:completionHandler: instead.)

+ (void)createChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct users:(NSArray<SBDUser*> *_Nonnull)users coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

users

The users to be members of the channel.

coverUrl

The cover image url of group channel.

data

The custom data of group channel.

completionHandler

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

Declared In

SBDGroupChannel.h

+ createChannelWithName:isDistinct:users:coverImage:coverImageName:data:progressHandler:completionHandler:

Creates a group channel with user objects. The group channel is distinct. (Deprecated: in 3.0.116 Use createChannelWithParams:completionHandler: instead.)

+ (void)createChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct users:(NSArray<SBDUser*> *_Nonnull)users coverImage:(NSData *_Nonnull)coverImage coverImageName:(NSString *_Nonnull)coverImageName data:(NSString *_Nullable)data progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

users

The users to be members of the channel.

coverImage

The cover image data of group channel.

coverImageName

The cover image file name of group channel.

data

The custom data of 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 users as members.

Declared In

SBDGroupChannel.h

+ createChannelWithName:isDistinct:userIds:coverUrl:data:completionHandler:

Creates a group channel with user IDs. (Deprecated: in 3.0.116 Use createChannelWithParams:completionHandler: instead.)

+ (void)createChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct userIds:(NSArray<NSString*> *_Nonnull)userIds coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

userIds

The user IDs to participate the channel.

coverUrl

The cover image url of group channel.

data

The custom data of group channel.

completionHandler

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

Declared In

SBDGroupChannel.h

+ createChannelWithName:isDistinct:userIds:coverUrl:data:customType:completionHandler:

Creates a group channel with user IDs. (Deprecated: in 3.0.116 Use createChannelWithParams:completionHandler: instead.)

+ (void)createChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct userIds:(NSArray<NSString*> *_Nonnull)userIds coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

userIds

The user IDs to participate the channel.

coverUrl

The cover image url of group channel.

data

The custom data of group channel.

customType

The custom type of group channel.

completionHandler

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

Declared In

SBDGroupChannel.h

– updateChannelWithName:isDistinct:coverUrl:data:completionHandler:

Updates a group channel with user IDs. (Deprecated: in 3.0.116 Use updateChannelWithParams:completionHandler: instead.)

- (void)updateChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

coverUrl

The cover image url of group channel.

data

The custom data of group channel.

completionHandler

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

Declared In

SBDGroupChannel.h

– updateChannelWithName:isDistinct:coverUrl:data:customType:completionHandler:

Updates a group channel with user IDs. (Deprecated: in 3.0.116 Use updateChannelWithParams:completionHandler: instead.)

- (void)updateChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

coverUrl

The cover image url of group channel.

data

The custom data of group channel.

customType

The custom type of group channel.

completionHandler

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

Declared In

SBDGroupChannel.h

– updateChannelWithName:coverUrl:data:completionHandler:

Updates a group channel with user IDs.

- (void)updateChannelWithName:(NSString *_Nullable)name coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

coverUrl

The cover image url of group channel.

data

The custom data of group channel.

completionHandler

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

Declared In

SBDGroupChannel.h

+ createChannelWithName:isDistinct:userIds:coverImage:coverImageName:data:progressHandler:completionHandler:

Creates a group channel with user IDs. (Deprecated: in 3.0.116 Use createChannelWithParams:completionHandler: instead.)

+ (void)createChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct userIds:(NSArray<NSString*> *_Nonnull)userIds coverImage:(NSData *_Nonnull)coverImage coverImageName:(NSString *_Nonnull)coverImageName data:(NSString *_Nullable)data progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

userIds

The user IDs to participate the channel.

coverImage

The cover image data of group channel.

coverImageName

The cover image file name of group channel.

data

The custom data of 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.

Declared In

SBDGroupChannel.h

+ createChannelWithName:isDistinct:userIds:coverImage:coverImageName:data:customType:progressHandler:completionHandler:

Creates a group channel with user IDs.

+ (void)createChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct userIds:(NSArray<NSString*> *_Nonnull)userIds coverImage:(NSData *_Nonnull)coverImage coverImageName:(NSString *_Nonnull)coverImageName data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

userIds

The user IDs to participate the channel.

coverImage

The cover image data of group channel.

coverImageName

The cover image file name of group channel.

data

The custom data of group channel.

customType

The custom type of 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.

Declared In

SBDGroupChannel.h

+ createChannelWithName:isDistinct:userIds:coverImageFilePath:data:customType:progressHandler:completionHandler:

Creates a group channel with user IDs. (Deprecated: in 3.0.116 Use createChannelWithParams:completionHandler: instead.)

+ (void)createChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct userIds:(NSArray<NSString*> *_Nonnull)userIds coverImageFilePath:(NSString *_Nonnull)coverImageFilePath data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

userIds

The user IDs to participate the channel.

coverImageFilePath

The cover image file path of group channel.

data

The custom data of group channel.

customType

The custom type of 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.

Declared In

SBDGroupChannel.h

+ createChannelWithParams:completionHandler:

Creates a group channel with SBDGroupChannelParams class.

+ (void)createChannelWithParams:(nonnull SBDGroupChannelParams *)params completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

params

The parameter instance of SBDGroupChannelParams 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.

Declared In

SBDGroupChannel.h

+ createDistinctChannelIfNotExistWithParams:completionHandler:

Creates a group channel with SBDGroupChannelParams class. The completionHandlerWithInfo returns isCreated, which notifies the channel instance is created now.

+ (void)createDistinctChannelIfNotExistWithParams:(nonnull SBDGroupChannelParams *)params completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , BOOL isCreated , SBDError *_Nullable error ))completionHandler

Parameters

params

The parameter instance of SBDGroupChannelParams 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 YES.

Availability

3.0.122

Declared In

SBDGroupChannel.h

– updateChannelWithName:isDistinct:coverImage:coverImageName:data:progressHandler:completionHandler:

Updates a group channel with user IDs. (Deprecated: in 3.0.116 Use updateChannelWithParams:completionHandler: instead.)

- (void)updateChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct coverImage:(NSData *_Nullable)coverImage coverImageName:(NSString *_Nullable)coverImageName data:(NSString *_Nullable)data progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

coverImage

The cover image data of group channel.

coverImageName

The cover image file name of group channel.

data

The custom data of 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.

Declared In

SBDGroupChannel.h

– updateChannelWithName:isDistinct:coverImage:coverImageName:data:customType:progressHandler:completionHandler:

Updates a group channel with user IDs.

- (void)updateChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct coverImage:(NSData *_Nullable)coverImage coverImageName:(NSString *_Nullable)coverImageName data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

coverImage

The cover image data of group channel.

coverImageName

The cover image file name of group channel.

data

The custom data of group channel.

customType

The custom type of 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.

Declared In

SBDGroupChannel.h

– updateChannelWithName:isDistinct:coverImageFilePath:data:customType:progressHandler:completionHandler:

Updates a group channel with user IDs. (Deprecated: in 3.0.116 Use updateChannelWithParams:completionHandler: instead.)

- (void)updateChannelWithName:(NSString *_Nullable)name isDistinct:(BOOL)isDistinct coverImageFilePath:(NSString *_Nullable)coverImageFilePath data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

isDistinct

If YES, the channel which has the same users is returned.

coverImageFilePath

The cover image file path of group channel.

data

The custom data of group channel.

customType

The custom type of 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.

Declared In

SBDGroupChannel.h

– updateChannelWithName:coverImage:coverImageName:data:progressHandler:completionHandler:

Updates a group channel with user IDs. (Deprecated: in 3.0.116 Use updateChannelWithParams:completionHandler: instead.)

- (void)updateChannelWithName:(NSString *_Nullable)name coverImage:(NSData *_Nullable)coverImage coverImageName:(NSString *_Nullable)coverImageName data:(NSString *_Nullable)data progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of group channel.

coverImage

The cover image data of group channel.

coverImageName

The cover image file name of group channel.

data

The custom data of 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.

Declared In

SBDGroupChannel.h

– updateChannelWithParams:completionHandler:

Update a group channel with SBDGroupChannelParams class.

- (void)updateChannelWithParams:(nonnull SBDGroupChannelParams *)params completionHandler:(nonnull void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

params

The parameter instance of SBDGroupChannelParams what has properties to update group channel.

completionHandler

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

Declared In

SBDGroupChannel.h

+ getChannelWithoutCache:completionHandler:

Gets a group channel instance with channel URL from server asynchronously. (Deprecated: in 3.0.116 DO NOT USE THIS METHOD.)

+ (void)getChannelWithoutCache:(NSString *_Nonnull)channelUrl completionHandler:(nullable void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

channelUrl

The channel URL.

completionHandler

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

Declared In

SBDGroupChannel.h

+ getChannelWithUrl:completionHandler:

Gets a group channel instance from channel URL asynchronously.

+ (void)getChannelWithUrl:(NSString *_Nonnull)channelUrl completionHandler:(nullable void ( ^ ) ( SBDGroupChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

channelUrl

The channel URL.

completionHandler

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

Declared In

SBDGroupChannel.h

– inviteUser:completionHandler:

Invites a single user to the group channel.

- (void)inviteUser:(SBDUser *_Nonnull)user completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

user

The user to be invited.

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– inviteUserId:completionHandler:

Invites a single user to the group channel.

- (void)inviteUserId:(NSString *_Nonnull)userId completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

userId

The user ID to be invited.

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– inviteUsers:completionHandler:

Invites multiple users to the group channel.

- (void)inviteUsers:(NSArray<SBDUser*> *_Nonnull)users completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

users

The user array to be invited.

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– inviteUserIds:completionHandler:

Invites multiple users to the group channel.

- (void)inviteUserIds:(NSArray<NSString*> *_Nonnull)userIds completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

userIds

The IDs of users array to be invited.

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– hideChannelWithCompletionHandler:

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. (Deprecated: in v3.0.63.)

- (void)hideChannelWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– hideChannelWithHidePreviousMessages:completionHandler:

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.

- (void)hideChannelWithHidePreviousMessages:(BOOL)hidePreviousMessages completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

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.

Declared In

SBDGroupChannel.h

– hideChannelWithHidePreviousMessages:allowAutoUnhide:completionHandler:

Hides the group channel with the auto unhide option. The channel will be hid from the channel list. If the allowAutoUnhide is YES, the channel will be appeared again when the other user send a message in the channel. However, if the allowAutoUnhide is NO, the channel will be appeared by unhideChannelWithCompletionHandler: method.

- (void)hideChannelWithHidePreviousMessages:(BOOL)hidePreviousMessages allowAutoUnhide:(BOOL)allowAutoUnhide completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

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.

Availability

3.0.122

Declared In

SBDGroupChannel.h

– unhideChannelWithCompletionHandler:

Unhides the group channel.

- (void)unhideChannelWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

THe handle block to be executed.

Availability

3.0.122

Declared In

SBDGroupChannel.h

– leaveChannelWithCompletionHandler:

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

- (void)leaveChannelWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– deleteChannelWithCompletionHandler:

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

- (void)deleteChannelWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute.

Availability

3.0.137

Declared In

SBDGroupChannel.h

+ markAsReadAllWithCompletionHandler:

Marks as read all group channels of the current user.

+ (void)markAsReadAllWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– markAsRead

Sends mark as read. The other members in the channel will receive an event. The event will be received in channelDidUpdateReadReceipt: of SBDChannelDelegate.

- (void)markAsRead

Declared In

SBDGroupChannel.h

– startTyping

Starts typing. The other members in the channel will receive an event. The event will be received in channelDidUpdateTypingStatus: of SBDChannelDelegate.

- (void)startTyping

Declared In

SBDGroupChannel.h

– endTyping

Ends typing. The other members in the channel will receive an event. The event will be received in channelDidUpdateTypingStatus: of SBDChannelDelegate.

- (void)endTyping

Declared In

SBDGroupChannel.h

+ getChannelFromCacheWithChannelUrl:

Internal use only. (Deprecated: in 3.0.116 DO NOT USE THIS METHOD.)

+ (SBDGroupChannel *_Nullable)getChannelFromCacheWithChannelUrl:(NSString *_Nonnull)channelUrl

Parameters

channelUrl

channelUrl

Discussion

Warning: Important: DON’T use this method. This method will be unavailable.

Declared In

SBDGroupChannel.h

– getReadReceiptOfMessage:

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

- (int)getReadReceiptOfMessage:(SBDBaseMessage *_Nonnull)message

Parameters

message

The message.

Return Value

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

Declared In

SBDGroupChannel.h

– getLastSeenAtByUser:

Returns the timestamp of the last seen at the channel by user. (Deprecated: in 3.0.86.)

- (long long)getLastSeenAtByUser:(SBDUser *_Nonnull)user

Parameters

user

The user

Return Value

the timestamp of the last seen at.

Declared In

SBDGroupChannel.h

– getLastSeenAtByUserId:

Returns the timestamp of the last seen at the channel by user Id. (Deprecated: in 3.0.86.)

- (long long)getLastSeenAtByUserId:(NSString *_Nonnull)userId

Parameters

userId

The user Id.

Return Value

the timestamp of the last seen at.

Declared In

SBDGroupChannel.h

– getReadMembersWithMessage:

Returns the members who read the message. (Deprecated: in 3.0.115.)

- (nullable NSArray<SBDMember*> *)getReadMembersWithMessage:(SBDBaseMessage *_Nonnull)message

Parameters

message

The message.

Return Value

Members who read the message.

Declared In

SBDGroupChannel.h

– getReadMembersWithMessage:includeAllMembers:

Returns the members who read the message.

- (nonnull NSArray<SBDMember*> *)getReadMembersWithMessage:(SBDBaseMessage *_Nonnull)message includeAllMembers:(BOOL)includeAllMembers

Parameters

message

The message.

includeAllMembers

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

Return Value

Members who read the message.

Availability

3.0.115

Declared In

SBDGroupChannel.h

– getUnreadMembersWithMessage:

Returns the members who didn’t read the message. (Deprecated: in 3.0.115.)

- (nullable NSArray<SBDMember*> *)getUnreadMembersWithMessage:(SBDBaseMessage *_Nonnull)message

Parameters

message

The message.

Return Value

Members who don’t read the message.

Declared In

SBDGroupChannel.h

– getUnreadMembersWithMessage:includeAllMembers:

Returns the members who didn’t read the message.

- (nonnull NSArray<SBDMember*> *)getUnreadMembersWithMessage:(SBDBaseMessage *_Nonnull)message includeAllMembers:(BOOL)includeAllMembers

Parameters

message

The message.

includeAllMembers

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

Return Value

Members who don’t read the message.

Availability

3.0.115

Declared In

SBDGroupChannel.h

– getReadStatus

Returns the read status. (Deprecated: in 3.0.115

The returned dictionary’s structure

{
  USER_ID:
    {
      "user": SBDUser object,
      "last_seen_at": NSNumber object,
    },
  ...
}

USER_ID is the user ID as a key. Each USER_ID has a NSDictionary which includes SBDUser object and NSNUmber object. The “user” is a key of SBDUser object and the “last_seen_at” is a key of NSNumber object. The NSNumber object has a 64-bit integer value for the timestamp in millisecond.)

- (nullable NSDictionary<NSString*,NSDictionary<NSString*,NSObject*> *> *)getReadStatus

Return Value

The read status. If there’s no data, it will be nil.

Declared In

SBDGroupChannel.h

– getReadStatusIncludingAllMembers:

Returns the read status.

- (nonnull NSDictionary<NSString*,NSDictionary<NSString*,NSObject*> *> *)getReadStatusIncludingAllMembers:(BOOL)includeAllMembers

Parameters

includeAllMembers

If YES, 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.

Availability

3.0.115

The returned dictionary’s structure

{
  USER_ID:
    {
      "user": SBDUser object,
      "last_seen_at": NSNumber object,
    },
  ...
}

USER_ID is the user ID as a key. Each USER_ID has a NSDictionary which includes SBDUser object and NSNUmber object. The “user” is a key of SBDUser object and the “last_seen_at” is a key of NSNumber object. The NSNumber object has a 64-bit integer value for the timestamp in millisecond.

Declared In

SBDGroupChannel.h

– isTyping

If other users are typing in the channel, YES is returned.

- (BOOL)isTyping

Return Value

Returns YES when other users are typing in this channel.

Declared In

SBDGroupChannel.h

– getTypingMembers

Returns the members who are typing now.

- (nullable NSArray<SBDMember*> *)getTypingMembers

Return Value

The members who are typing now.

Declared In

SBDGroupChannel.h

– setPushPreferenceWithPushOn:completionHandler:

Sets push notification on or off on the channel.

- (void)setPushPreferenceWithPushOn:(BOOL)pushOn completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

pushOn

Sets push on/off.

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– getPushPreferenceWithCompletionHandler:

Gets push notification on off on the channel. (Deprecated: in 3.0.21. Use isPushEnabled property instead.)

- (void)getPushPreferenceWithCompletionHandler:(nullable void ( ^ ) ( BOOL pushOn , SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block of execute. The pushOn means that the push notification of the channel is on or off.

Declared In

SBDGroupChannel.h

– setMyPushTriggerOption:completionHandler:

Changes a setting that decides which push notification for the current user to receive in the group channel. If a value of option is SBDGroupChannelPushTriggerOptionDefault, a push trigger option in this group channel follows a push trigger option of the current user. It is related with [SBDMain setPushTriggerOption:completionHandler:].

- (void)setMyPushTriggerOption:(SBDGroupChannelPushTriggerOption)pushTriggerOption completionHandler:(nullable SBDErrorHandler)completionHandler

Parameters

pushTriggerOption

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

completionHandler

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

Availability

3.0.128

Declared In

SBDGroupChannel.h

– getMyPushTriggerOptionWithCompletionHandler:

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

- (void)getMyPushTriggerOptionWithCompletionHandler:(nonnull SBDGroupChannelPushTriggerOptionHandler)completionHandler

Parameters

completionHandler

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

Availability

3.0.128

Declared In

SBDGroupChannel.h

+ getTotalUnreadMessageCountWithCompletionHandler:

Gets the total unread message count of all group channels. (Deprecated: in 3.0.116 Use [SBDMain getTotalUnreadMessageCountWithCompletionHandler:] instead.)

+ (void)getTotalUnreadMessageCountWithCompletionHandler:(nullable void ( ^ ) ( NSUInteger unreadCount , SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute. The unreadCount is the total count of unread messages in all of group channel which the current is a member.

Declared In

SBDGroupChannel.h

+ getTotalUnreadChannelCountWithCompletionHandler:

Gets the total unread channel count of all group channels. (Deprecated: in 3.0.116 Use [SBDMain getTotalUnreadChannelCountWithCompletionHandler:] instead.)

+ (void)getTotalUnreadChannelCountWithCompletionHandler:(nullable void ( ^ ) ( NSUInteger unreadCount , SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute. The unreadCount is the total count of unread channels in all of group channel which the current is a member.

Declared In

SBDGroupChannel.h

+ getTotalUnreadMessageCountWithChannelCustomTypes:completionHandler:

Gets the total unread message count of the channels that have the specific custom types. (Deprecated: in 3.0.116 Use [SBDMain getTotalUnreadMessageCountWithParams:completionHandler:] instead.)

+ (void)getTotalUnreadMessageCountWithChannelCustomTypes:(NSArray<NSString*> *_Nullable)customTypes completionHandler:(nullable void ( ^ ) ( NSUInteger unreadCount , SBDError *_Nullable error ))completionHandler

Parameters

customTypes

The array of the custom types. If the array is nil or the length of the array is zero, the total unread message count will be the same result of the getTotalUnreadMessageCountWithCompletionHandler:.

completionHandler

The handler block to execute. The unreadCount is the total unread message count of the channels that have the specific custom types. If there isn’t any error, the error will be nil.

Declared In

SBDGroupChannel.h

+ getTotalUnreadMessageCountWithParams:completionHandler:

Gets the total unread message count of the channels with filters of params. (Deprecated: in 3.0.116 Use [SBDMain getTotalUnreadMessageCountWithParams:completionHandler:] instead.)

+ (void)getTotalUnreadMessageCountWithParams:(nonnull SBDGroupChannelTotalUnreadMessageCountParams *)params completionHandler:(nonnull void ( ^ ) ( NSUInteger unreadCount , SBDError *_Nullable error ))completionHandler

Parameters

params

The instance of parameters to filter.

completionHandler

The handler block to be executed after getting total unread message count. This block has no return value and takes two argument, the one is the number of unread message and the other is error.

Availability

3.0.97

Declared In

SBDGroupChannel.h

+ buildFromSerializedData:

Builds a group channel object from serialized data.

+ (nullable instancetype)buildFromSerializedData:(NSData *_Nonnull)data

Parameters

data

Serialized data.

Return Value

SBDGroupChannel object.

Declared In

SBDGroupChannel.h

– serialize

Serializes group channel object.

- (nullable NSData *)serialize

Return Value

Serialized data.

Declared In

SBDGroupChannel.h

+ hasChannelInCache:

Checks if there is a channel object in cache. (Deprecated: in 3.0.116 DO NOT USE THIS METHOD.)

+ (BOOL)hasChannelInCache:(NSString *_Nonnull)channelUrl

Parameters

channelUrl

Channel URL to check.

Return Value

If YES, cache has the channel.

Declared In

SBDGroupChannel.h

– hasMember:

Checks if the channel has a member that has userId.

- (BOOL)hasMember:(NSString *_Nonnull)userId

Parameters

userId

User ID.

Return Value

If YES, the channel has the member.

Declared In

SBDGroupChannel.h

– getMember:

Gets member in the channel.

- (nullable SBDMember *)getMember:(NSString *_Nonnull)userId

Parameters

userId

User ID.

Return Value

SBDUser object as a member. If there is a member who has the userId, returns nil.

Declared In

SBDGroupChannel.h

– acceptInvitationWithCompletionHandler:

Accpets the invitation.

- (void)acceptInvitationWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– acceptInvitationWithAccessCode:completionHandler:

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

- (void)acceptInvitationWithAccessCode:(nullable NSString *)accessCode completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

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.

Availability

3.0.116

Declared In

SBDGroupChannel.h

– declineInvitationWithCompletionHandler:

Declines the invitation.

- (void)declineInvitationWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– getInviter

Gets the inviter.

- (nullable SBDUser *)getInviter

Return Value

Inviter.

Declared In

SBDGroupChannel.h

– resetMyHistoryWithCompletionHandler:

Resets the history in this channel.

- (void)resetMyHistoryWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

+ getChannelCountWithMemberStateFilter:completionHandler:

Gets the group channel count. (Deprecated: in 3.0.116 Use [SBDMain getChannelCountWithMemberStateFilter:completionHandler:] instead.)

+ (void)getChannelCountWithMemberStateFilter:(SBDMemberStateFilter)memberStateFilter completionHandler:(nullable void ( ^ ) ( NSUInteger groupChannelCount , SBDError *_Nullable error ))completionHandler

Parameters

memberStateFilter

The member state of the current user in the channels that are counted.

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– joinWithCompletionHandler:

Join a group channel

- (void)joinWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute.

Declared In

SBDGroupChannel.h

– joinWithAccessCode:completionHandler:

Join a public group channel that has access code.

- (void)joinWithAccessCode:(nullable NSString *)accessCode completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

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.

Availability

3.0.116

Declared In

SBDGroupChannel.h

– banUserWithUserId:seconds:description:completionHandler:

Bans a user for seconds. Let a user out and prevent to join again. If the user is already banned, duration will be updated from the time that was initialized.

- (void)banUserWithUserId:(nonnull NSString *)userId seconds:(NSInteger)seconds description:(nullable NSString *)description completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

userId

The user id to be banned.

seconds

Seconds of ducation to be banned. Seconds should be larger than -1. If it is -1, user is banned forever. If it is 0, duration is set 10years by default.

description

The reason why the user was banned.

completionHandler

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

Availability

3.0.89

Declared In

SBDGroupChannel.h

– banUser:seconds:description:completionHandler:

Bans a user for seconds. Let a user out and prevent to join again. If the user is already banned, duration will be updated from the time that was initialized.

- (void)banUser:(nonnull SBDUser *)user seconds:(NSInteger)seconds description:(nullable NSString *)description completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

user

The user to be banned.

seconds

Seconds of ducation to be banned. Seconds should be larger than -1. If it is -1, user is banned forever. If it is 0, duration is set 10years by default.

description

The reason why the user was banned.

completionHandler

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

Availability

3.0.89

Declared In

SBDGroupChannel.h

– unbanUserWithUserId:completionHandler:

Remove ban for a user.

- (void)unbanUserWithUserId:(nonnull NSString *)userId completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

userId

The user id to be removed ban.

completionHandler

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

Availability

3.0.89

Declared In

SBDGroupChannel.h

– unbanUser:completionHandler:

Remove ban for a user.

- (void)unbanUser:(nonnull SBDUser *)user completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

user

The user to be removed ban.

completionHandler

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

Availability

3.0.89

Declared In

SBDGroupChannel.h

– muteUserWithUserId:completionHandler:

Mute the user. Muted user cannot send any messages to the group channel.

- (void)muteUserWithUserId:(nonnull NSString *)userId completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

userId

The user id to be muted.

completionHandler

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

Availability

3.0.89

Declared In

SBDGroupChannel.h

– muteUser:completionHandler:

Mute the user. Muted user cannot send any messages to the group channel.

- (void)muteUser:(nonnull SBDUser *)user completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

user

The user to be muted.

completionHandler

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

Availability

3.0.89

Declared In

SBDGroupChannel.h

– muteUser:seconds:description:completionHandler:

Mute the user with additional options. Muted user cannot send any messages to the group channel.

- (void)muteUser:(nonnull SBDUser *)user seconds:(NSInteger)seconds description:(nullable NSString *)description completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

user

The user to be muted

seconds

The user cannot send any messages for this time.

description

The description that explains the reason why the user is muted.

completionHandler

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

Availability

3.0.118

Declared In

SBDGroupChannel.h

– muteUserWithUserId:seconds:description:completionHandler:

Mute the user with additional options. Muted user cannot send any messages to the group channel.

- (void)muteUserWithUserId:(nonnull NSString *)userId seconds:(NSInteger)seconds description:(nullable NSString *)description completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

userId

The user ID to be muted

seconds

The user cannot send any messages for this time.

description

The description that explains the reason why the user is muted.

completionHandler

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

Availability

3.0.118

Declared In

SBDGroupChannel.h

– unmuteUserWithUserId:completionHandler:

Turn off mute the user.

- (void)unmuteUserWithUserId:(nonnull NSString *)userId completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

userId

The user Id to be turned off mute.

completionHandler

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

Availability

3.0.89

Declared In

SBDGroupChannel.h

– unmuteUser:completionHandler:

Turn off mute the user.

- (void)unmuteUser:(nonnull SBDUser *)user completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

user

The user to be turned off mute.

completionHandler

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

Availability

3.0.89

Declared In

SBDGroupChannel.h

– freezeWithCompletionHandler:

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

- (void)freezeWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

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

Availability

3.0.89

Declared In

SBDGroupChannel.h

– unfreezeWithCompletionHandler:

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

- (void)unfreezeWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

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

Availability

3.0.89

Declared In

SBDGroupChannel.h

– getUnreadItemCountWithKey:completionHandler:

Get unread counts of message and invitation counts in super and non_super channels. (Deprecated: in v3.0.103)

- (void)getUnreadItemCountWithKey:(SBDUnreadItemKey)key completionHandler:(nonnull void ( ^ ) ( SBDUnreadItemCount *_Nullable count , SBDError *_Nullable error ))completionHandler

Parameters

key

bitmask key composed of super/non_super unread message count, super/non_super invitation count.

completionHandler

The handler block to be executed after getting unread item count. This block has no return value and takes two argument. the one is type of SBDUnreadItemCount that contains unsinged interger for count you requested. the other is an error made when there is something wrong to response.

Availability

3.0.101

Discussion

Warning: DO NOT USE!. Will be removed. Use [SBDGroupChannel getUnreadItemCountWithKey:completionHandler:].

See Also

  • [SBDGroupChannel getUnreadItemCountWithKey:completionHandler:]

Declared In

SBDGroupChannel.h

+ getUnreadItemCountWithKey:completionHandler:

Get unread counts of message and invitation counts in super and non_super channels. (Deprecated: in 3.0.116 Use [SBDMain getUnreadItemCountWithKey:completionHandler:] instead.)

+ (void)getUnreadItemCountWithKey:(SBDUnreadItemKey)key completionHandler:(nonnull void ( ^ ) ( SBDUnreadItemCount *_Nullable count , SBDError *_Nullable error ))completionHandler

Parameters

key

bitmask key composed of super/non_super unread message count, super/non_super invitation count.

completionHandler

The handler block to be executed after getting unread item count. This block has no return value and takes two argument. the one is type of SBDUnreadItemCount that contains unsinged interger for count you requested. the other is an error made when there is something wrong to response.

Availability

3.0.103

See Also

  • [SBDMain getUnreadItemCountWithKey:completionHandler:]

Declared In

SBDGroupChannel.h

– setMyCountPreference:completionHandler:

Sets count preference of current user.

- (void)setMyCountPreference:(SBDCountPreference)myCountPreference completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

myCountPreference

Preference is type of SBDCountPreference. The default value is SBDCountPreferenceAll.

Availability

3.0.102

Declared In

SBDGroupChannel.h

– registerScheduledUserMessageWithParams:completionHandler:

Registers a scheduled user message. The message will be sent at the specified time in params.

- (void)registerScheduledUserMessageWithParams:(nonnull SBDScheduledUserMessageParams *)params completionHandler:(nullable void ( ^ ) ( SBDScheduledUserMessage *_Nullable scheduledUserMessage , SBDError *_Nullable error ))completionHandler

Parameters

params

The instance of SBDScheduledUserMessageParams that can has parameters related with a text message. It has also the specified time to send a user message.

completionHandler

The handler block to be executed.

Availability

3.0.119

Declared In

SBDGroupChannel.h