SBDOpenChannel Class Reference

Inherits from SBDBaseChannel : NSObject
Conforms to SBDMappable
Declared in SBDOpenChannel.h

Overview

The SBDOpenChannel class represents a public chat. This is a channel type which anyone can participate without a permission. It can handle thousands of users in one channel. This channel has participants instead of members of SBDGroupChannel and every participant is always online. A user can be included as an operator when a channel is created. The operator has a permission to mute, unmute, ban and unban participants. The muted user can see the messages in the channel, but can’t say anything. The unbanned user can’t enter the channel. If a user who is in the channel is banned, the user will be kicked from the channel.

  participantCount

The number of participants in this channel.

@property (nonatomic) NSInteger participantCount

Declared In

SBDOpenChannel.h

  operators

The operators of this channel.

@property (strong, nonatomic, readonly, nullable) NSMutableArray<SBDUser*> *operators

Declared In

SBDOpenChannel.h

+ createOpenChannelListQuery

Creates a query instance for open channel list.

+ (nullable SBDOpenChannelListQuery *)createOpenChannelListQuery

Return Value

The query instance for open channel list.

Declared In

SBDOpenChannel.h

+ createChannelWithCompletionHandler:

Creates an open channel.

+ (void)createChannelWithCompletionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute. channel is the open channel instance which is created. The name and cover URL of the channel are generated in Sendbird server.

Declared In

SBDOpenChannel.h

+ createChannelWithName:channelUrl:coverUrl:data:operatorUserIds:customType:completionHandler:

Creates an open channel.

+ (void)createChannelWithName:(NSString *_Nullable)name channelUrl:(NSString *_Nullable)channelUrl coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data operatorUserIds:(NSArray<NSString*> *_Nullable)operatorUserIds customType:(NSString *_Nullable)customType completionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of the channel.

channelUrl

The channel URL. If nil, channel url will be determined randomly.

coverUrl

The cover image URL.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

customType

The custom type for channel.

completionHandler

The handler block to execute. channel is the open channel instance which is created.

Declared In

SBDOpenChannel.h

+ createChannelWithName:channelUrl:coverImage:coverImageName:data:operatorUserIds:customType:progressHandler:completionHandler:

Creates an open channel.

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

Parameters

name

The name of the channel.

channelUrl

The channel URL. If nil, channel url will be determined randomly.

coverImage

The cover image data of open channel.

coverImageName

The cover image file name of open channel.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

customType

The custom type for 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 open channel instance which is created.

Declared In

SBDOpenChannel.h

+ createChannelWithParams:completionHandler:

Creates a open channel with SBDOpenChannelParams class.

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

Parameters

params

The parameter instance of SBDOpenChannelParams what has properties to create open channel.

completionHandler

The handler block to execute. channel is the open channel instance.

Availability

3.0.206

Declared In

SBDOpenChannel.h

+ createChannelWithParams:progressHandler:completionHandler:

Creates a open channel with SBDOpenChannelParams class.

+ (void)createChannelWithParams:(nonnull SBDOpenChannelParams *)params progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

params

The parameter instance of SBDOpenChannelParams what has properties to create open 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 open channel instance.

Availability

3.0.206

Declared In

SBDOpenChannel.h

– updateChannelWithName:coverUrl:data:operatorUsers:completionHandler:

Updates an open channel with properties.

- (void)updateChannelWithName:(NSString *_Nullable)name coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data operatorUsers:(NSArray<SBDUser*> *_Nullable)operatorUsers completionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of the channel.

coverUrl

The cover image URL.

data

The data for channel.

operatorUsers

The operator users of channel.

completionHandler

The handler block to execute. channel is the open channel instance which is created.

Declared In

SBDOpenChannel.h

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

Updates an open channel.

- (void)updateChannelWithName:(NSString *_Nullable)name coverImage:(NSData *_Nullable)coverImage coverImageName:(NSString *_Nullable)coverImageName data:(NSString *_Nullable)data operatorUserIds:(NSArray<NSString*> *_Nullable)operatorUserIds customType:(NSString *_Nullable)customType progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of the channel.

coverImage

The cover image data of open channel.

coverImageName

The cover image file name of open channel.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

customType

The custom type for 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 open channel instance which is created.

Declared In

SBDOpenChannel.h

– updateChannelWithParams:completionHandler:

Updates a open channel with SBDOpenChannelParams class.

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

Parameters

params

The parameter instance of SBDOpenChannelParams what has properties to update open channel.

completionHandler

The handler block to execute. channel is the open channel instance.

Availability

3.0.206

Declared In

SBDOpenChannel.h

– updateChannelWithParams:progressHandler:completionHandler:

Updates a open channel with SBDOpenChannelParams class.

- (void)updateChannelWithParams:(nonnull SBDOpenChannelParams *)params progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

params

The parameter instance of SBDOpenChannelParams what has properties to update open 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 open channel instance.

Availability

3.0.206

Declared In

SBDOpenChannel.h

– deleteChannelWithCompletionHandler:

Deletes open channel

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

Parameters

completionHandler

The handler block to execute. channel is the open channel instance which is deleted.

Availability

3.0.180

Declared In

SBDOpenChannel.h

+ getChannelWithUrl:completionHandler:

Gets an open channel instance from channel URL.

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

Parameters

channelUrl

The channel URL.

completionHandler

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

Declared In

SBDOpenChannel.h

– enterChannelWithCompletionHandler:

Enters the channel.

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

Parameters

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– exitChannelWithCompletionHandler:

Exits the channel.

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

Parameters

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– createParticipantListQuery

Creates a query instance for getting participant list of the channel instance.

- (nullable SBDParticipantListQuery *)createParticipantListQuery

Return Value

SBDUserListQuery instance for the participant list of the channel instance.

Declared In

SBDOpenChannel.h

– createMutedUserListQuery

Creates a query instance for getting muted user list of the channel instance.

- (nullable SBDMutedUserListQuery *)createMutedUserListQuery

Return Value

SBDUserListQuery instance for the muted user list.

Declared In

SBDOpenChannel.h

– createBannedUserListQuery

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

- (nullable SBDBannedUserListQuery *)createBannedUserListQuery

Return Value

SBDUserListQuery instance for the banned user list.

Declared In

SBDOpenChannel.h

– refreshWithCompletionHandler:

Refreshes the channel information.

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

Parameters

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– banUser:seconds:completionHandler:

Bans a user with the user object.

- (void)banUser:(SBDUser *_Nonnull)user seconds:(int)seconds completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

user

The user object.

seconds

Duration for ban in seconds.

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– banUserWithUserId:seconds:completionHandler:

Bans a user with the user ID.

- (void)banUserWithUserId:(NSString *_Nonnull)userId seconds:(int)seconds completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler

Parameters

userId

The user ID.

seconds

Duration for ban in seconds.

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– unbanUser:completionHandler:

Unbans a user with the user object.

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

Parameters

user

The user object.

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– unbanUserWithUserId:completionHandler:

Unbans a user with the user ID.

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

Parameters

userId

The user ID.

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– muteUser:completionHandler:

Mutes auser with the user object.

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

Parameters

user

The user object.

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– muteUserWithUserId:completionHandler:

Mutes a user with the user ID.

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

Parameters

userId

The user ID.

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– muteUser:seconds:description:completionHandler:

Mute the user with additional options. Muted user cannot send any messages to the open 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

SBDOpenChannel.h

– muteUserWithUserId:seconds:description:completionHandler:

Mute the user with additional options. Muted user cannot send any messages to the open 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

SBDOpenChannel.h

– unmuteUser:completionHandler:

Unmutes a user with the user object.

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

Parameters

user

The user object.

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– unmuteUserWithUserId:completionHandler:

Unmutes a user with the user ID.

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

Parameters

userId

The user ID.

completionHandler

The handler block to execute.

Declared In

SBDOpenChannel.h

– isOperatorWithUser:

Returns the user is an operator or not.

- (BOOL)isOperatorWithUser:(SBDUser *_Nonnull)user

Parameters

user

The user object.

Return Value

If YES, the user is an operator.

Declared In

SBDOpenChannel.h

– isOperatorWithUserId:

Returns the user ID is an operator or not.

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

Parameters

userId

The user ID.

Return Value

If YES, the user ID is an operator.

Declared In

SBDOpenChannel.h

– serialize

Serializes open channel object.

- (nullable NSData *)serialize

Return Value

Serialized data.

Declared In

SBDOpenChannel.h

+ createChannelWithName:coverUrl:data:operatorUsers:completionHandler:

Creates an open channel with properties. (Deprecated: 3.0.116. (Use createChannelWithParams:progressHandler:completionHandler: instead.))

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

Parameters

name

The name of the channel.

coverUrl

The cover image URL.

data

The data for channel.

operatorUsers

The operator users of channel.

completionHandler

The handler block to execute. channel is the open channel instance which is created.

Declared In

SBDOpenChannel.h

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

Creates an open channel with properties. (Deprecated: 3.0.116. (Use createChannelWithParams:progressHandler:completionHandler: instead.))

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

Parameters

name

The name of the channel.

coverImage

The cover image data of open channel.

coverImageName

The cover image file name of open channel.

data

The data for channel.

operatorUsers

The operator users of 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 open channel instance which is created.

Declared In

SBDOpenChannel.h

+ createChannelWithName:coverUrl:data:operatorUserIds:completionHandler:

Creates an open channel. (Deprecated: 3.0.116. (Use createChannelWithParams:progressHandler:completionHandler: instead.))

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

Parameters

name

The name of the channel.

coverUrl

The cover image URL.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

completionHandler

The handler block to execute. channel is the open channel instance which is created.

Declared In

SBDOpenChannel.h

+ createChannelWithName:coverUrl:data:operatorUserIds:customType:completionHandler:

Creates an open channel. (Deprecated: 3.0.116. (Use createChannelWithParams:progressHandler:completionHandler: instead.))

+ (void)createChannelWithName:(NSString *_Nullable)name coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data operatorUserIds:(NSArray<NSString*> *_Nullable)operatorUserIds customType:(NSString *_Nullable)customType completionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of the channel.

coverUrl

The cover image URL.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

customType

The custom type for channel.

completionHandler

The handler block to execute. channel is the open channel instance which is created.

Declared In

SBDOpenChannel.h

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

Creates an open channel. (Deprecated: 3.0.116. (Use createChannelWithParams:progressHandler:completionHandler: instead.))

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

Parameters

name

The name of the channel.

coverImage

The cover image data of open channel.

coverImageName

The cover image file name of open channel.

data

The data for channel.

operatorUserIds

The operator user IDs of 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 open channel instance which is created.

Declared In

SBDOpenChannel.h

+ createChannelWithName:coverImage:coverImageName:data:operatorUserIds:customType:progressHandler:completionHandler:

Creates an open channel. (Deprecated: 3.0.116. (Use createChannelWithParams:progressHandler:completionHandler: instead.))

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

Parameters

name

The name of the channel.

coverImage

The cover image data of open channel.

coverImageName

The cover image file name of open channel.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

customType

The custom type for 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 open channel instance which is created.

Declared In

SBDOpenChannel.h

+ createChannelWithName:coverImageFilePath:data:operatorUserIds:customType:progressHandler:completionHandler:

Creates an open channel. (Deprecated: 3.0.116. (Use createChannelWithParams:progressHandler:completionHandler: instead.))

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

Parameters

name

The name of the channel.

coverImageFilePath

The cover image file path of open channel.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

customType

The custom type for 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 open channel instance which is created.

Declared In

SBDOpenChannel.h

+ createChannelWithName:channelUrl:coverImageFilePath:data:operatorUserIds:customType:progressHandler:completionHandler:

Creates an open channel. (Deprecated: 3.0.116. (Use createChannelWithParams:progressHandler:completionHandler: instead.))

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

Parameters

name

The name of the channel.

channelUrl

The channel URL. If nil, channel url will be determined randomly.

coverImageFilePath

The cover image file path of open channel.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

customType

The custom type for 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 open channel instance which is created.

Declared In

SBDOpenChannel.h

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

Updates an open channel with properties. (Deprecated: 3.0.116. (Use updateChannelWithParams:progressHandler:completionHandler: instead.))

- (void)updateChannelWithName:(NSString *_Nullable)name coverImage:(NSData *_Nullable)coverImage coverImageName:(NSString *_Nullable)coverImageName data:(NSString *_Nullable)data operatorUsers:(NSArray<SBDUser*> *_Nullable)operatorUsers progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of the channel.

coverImage

The cover image data of open channel.

coverImageName

The cover image file name of open channel.

data

The data for channel.

operatorUsers

The operator users of 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 open channel instance which is created.

Declared In

SBDOpenChannel.h

– updateChannelWithName:coverUrl:data:operatorUserIds:completionHandler:

Updates an open channel. (Deprecated: 3.0.116. (Use updateChannelWithParams:progressHandler:completionHandler: instead.))

- (void)updateChannelWithName:(NSString *_Nullable)name coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data operatorUserIds:(NSArray<NSString*> *_Nullable)operatorUserIds completionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of the channel.

coverUrl

The cover image URL.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

completionHandler

The handler block to execute. channel is the open channel instance which is created.

Declared In

SBDOpenChannel.h

– updateChannelWithName:coverUrl:data:operatorUserIds:customType:completionHandler:

Updates an open channel. (Deprecated: 3.0.116. (Use updateChannelWithParams:progressHandler:completionHandler: instead.))

- (void)updateChannelWithName:(NSString *_Nullable)name coverUrl:(NSString *_Nullable)coverUrl data:(NSString *_Nullable)data operatorUserIds:(NSArray<NSString*> *_Nullable)operatorUserIds customType:(NSString *_Nullable)customType completionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of the channel.

coverUrl

The cover image URL.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

customType

The custom type for channel.

completionHandler

The handler block to execute. channel is the open channel instance which is created.

Declared In

SBDOpenChannel.h

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

Updates an open channel. (Deprecated: 3.0.116. (Use updateChannelWithParams:progressHandler:completionHandler: instead.))

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

Parameters

name

The name of the channel.

coverImage

The cover image data of open channel.

coverImageName

The cover image file name of open channel.

data

The data for channel.

operatorUserIds

The operator user IDs of 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 open channel instance which is created.

Declared In

SBDOpenChannel.h

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

Updates an open channel. (Deprecated: 3.0.116. (Use updateChannelWithParams:progressHandler:completionHandler: instead.))

- (void)updateChannelWithName:(NSString *_Nullable)name coverImageFilePath:(NSString *_Nullable)coverImageFilePath data:(NSString *_Nullable)data operatorUserIds:(NSArray<NSString*> *_Nullable)operatorUserIds customType:(NSString *_Nullable)customType progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nonnull void ( ^ ) ( SBDOpenChannel *_Nullable channel , SBDError *_Nullable error ))completionHandler

Parameters

name

The name of the channel.

coverImageFilePath

The cover image file path of open channel.

data

The data for channel.

operatorUserIds

The operator user IDs of channel.

customType

The custom type for 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 open channel instance which is created.

Declared In

SBDOpenChannel.h