Inherits from NSObject
Declared in RespokeGroup.h

Overview

A group, representing a collection of connections and the method by which to communicate with them.

Tasks

Other Methods

private Methods

Properties

delegate

@property (weak) id<RespokeGroupDelegate> delegate
Discussion

The delegate that should receive notifications from the RespokeGroupDelegate protocol

Declared In

RespokeGroup.h

Instance Methods

connectionDidJoin:

- (void)connectionDidJoin:(RespokeConnection *)connection
Discussion

Notify the group that a connection has joined

Parameters

connection

The connection that has joined the group

Declared In

RespokeGroup+private.h

connectionDidLeave:

- (void)connectionDidLeave:(RespokeConnection *)connection
Discussion

Notify the group that a connection has left

Parameters

connection

The connection that has left the group

Declared In

RespokeGroup+private.h

didReceiveMessage:fromEndpoint:withTimestamp:

- (void)didReceiveMessage:(NSString *)message fromEndpoint:(RespokeEndpoint *)endpoint withTimestamp:(NSDate *)timestamp
Discussion

Notify the group that a group message was received

Parameters

message

The body of the message

endpoint

The endpoint that sent the message

timestamp

The message timestamp

Declared In

RespokeGroup+private.h

getGroupID

- (NSString *)getGroupID
Discussion

Get the ID of this group

Return Value

The ID

Declared In

RespokeGroup.h

getMembersWithSuccessHandler:errorHandler:

- (void)getMembersWithSuccessHandler:(void ( ^ ) ( NSArray *))successHandler errorHandler:(void ( ^ ) ( NSString *))errorHandler
Discussion

Get an array containing the members of the group.

Parameters

successHandler

A block called when the action is successful, passing the array of members as RespokeConnection objects

errorHandler

A block called when an error occurs, passing a string describing the error

Declared In

RespokeGroup.h

initWithGroupID:signalingChannel:client:

- (instancetype)initWithGroupID:(NSString *)groupID signalingChannel:(RespokeSignalingChannel *)channel client:(RespokeClient *)newClient
Discussion

Initialize a new group instance. Defaults to setting the group’s isJoined to true. To manually specify the isJoined param, use the other method signature.

Parameters

groupID

The ID of the group

channel

The signaling channel to use

client

The client managing this group

Return Value

The newly initialized instance

Declared In

RespokeGroup+private.h

initWithGroupID:signalingChannel:client:isJoined:

- (instancetype)initWithGroupID:(NSString *)groupID signalingChannel:(RespokeSignalingChannel *)channel client:(RespokeClient *)newClient isJoined:(BOOL)isJoined
Discussion

Initialize a new group instance

Parameters

groupID

The ID of the group

channel

The signaling channel to use

isJoined

Whether the group has already been joined

client

The client managing this group

Return Value

The newly initialized instance

Declared In

RespokeGroup+private.h

isConnected

- (BOOL)isConnected

isJoined

- (BOOL)isJoined
Discussion

Return true if the logged-in user is a member of this group and false if not.

Return Value

The membership status

Declared In

RespokeGroup.h

joinWithSuccessHandler:errorHandler:

- (void)joinWithSuccessHandler:(void ( ^ ) ( void ))successHandler errorHandler:(void ( ^ ) ( NSString *))errorHandler
Discussion

Join this group

Parameters

successHandler

A block called when the action is successful

errorHandler

A block called when an error occurs, passing a string describing the error

Declared In

RespokeGroup.h

leaveWithSuccessHandler:errorHandler:

- (void)leaveWithSuccessHandler:(void ( ^ ) ( void ))successHandler errorHandler:(void ( ^ ) ( NSString *))errorHandler
Discussion

Leave this group

Parameters

successHandler

A block called when the action is successful

errorHandler

A block called when an error occurs, passing a string describing the error

Declared In

RespokeGroup.h

sendMessage:push:persist:successHandler:errorHandler:

- (void)sendMessage:(NSString *)message push:(BOOL)push persist:(BOOL)persist successHandler:(void ( ^ ) ( void ))successHandler errorHandler:(void ( ^ ) ( NSString *))errorHandler
Discussion

Send a message to the entire group.

Parameters

message

The message to send

push

A flag indicating if a push notification should be sent for this message

persist

A flag indicating that this message should be persisted to the group’s message history

successHandler

A block called when the action is successful

errorHandler

A block called when an error occurs, passing a string describing the error

Declared In

RespokeGroup.h

sendMessage:push:successHandler:errorHandler:

- (void)sendMessage:(NSString *)message push:(BOOL)push successHandler:(void ( ^ ) ( void ))successHandler errorHandler:(void ( ^ ) ( NSString *))errorHandler
Discussion

Send a message to the entire group. To specify that you wish to persist the message to the Respoke group message history, use the other method signature that allows persist to be specified.

Parameters

message

The message to send

push

A flag indicating if a push notification should be sent for this message

successHandler

A block called when the action is successful

errorHandler

A block called when an error occurs, passing a string describing the error

Declared In

RespokeGroup.h