SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
ObjectMessageRequest Class Reference

#import <ObjectMessageRequest.h>

Inherits GenericMessageRequest.

Instance Methods

(id) - initWithObject:targetRoom:recipients:
 

Class Methods

(id) + requestWithObject:targetRoom:recipients:
 
(id) + requestWithObject:
 

Detailed Description

Send a custom data Object to all users in a Room or a sub-selection of them

(If you are familiar with SmartFoxServer 1.x this request the equivalent of sendObject) The request allow to send a custom data object to all users in the same Room. A typical use of this request is for sending game moves to other players

Method Documentation

◆ requestWithObject:targetRoom:recipients:

+ (id) requestWithObject: (id <ISFSObject>)  obj
targetRoom: (id <Room>)  targetRoom
recipients: (NSArray *)  recipients 
Parameters
objthe custom object
targetRooman optional target room. This room must be joined and by default it is the last joined Room
recipientsan optional selection of Users in the target Room (by default the message is sent to all Users)
See also
[ISFSEvents onObjectMessage:]