Inherits from BaseRequest : NSObject
Declared in JoinRoomInvitationRequest.h
JoinRoomInvitationRequest.m

Overview

Sends an invitation to other users/players to join a specific Room. Invitations can be used for different purposes such as playing games, visiting a specific Room, Buddy requests etc…

Depending on the Room’s settings this invitation can be sent only by Room’s owner or by all other players, with the exception of spectators. This behavior can be changed via the RoomSetting.allowOwnerOnlyInvitation parameter.

NOTE: spectators in a game Room are not allowed to invite other people.

An invitation can also specify the amount of time given to each invitee to reply. Default is 30 seconds. A positive answer will attempt to join the user in the designated Room. For game Rooms the asSpectator flag can be toggled to join the invitee as player or spectator (default = player).

There aren’t any specific notifications sent back to the inviter after the invitee’s response. Users that have accepted the invitation will join the Room while those who didn’t reply or turned down the invitation won’t generate any event. In case you want to send specific messages (e.g. chat) you can simply send a private message back to the inviter.

See RoomSettings

Class Methods

initWithInvitedUserNames:targetRoom:expirySeconds:asSpectator:params:

Sends an invitation to join an existing Room.

+ (id)initWithInvitedUserNames:(NSArray *)invitedUserNames targetRoom:(id<Room>)room expirySeconds:(NSInteger)secs asSpectator:(BOOL)asSpect params:(id<ISFSObject>)params

Parameters

invitedUserNames

an array of online user names to invite in the Room

asSpect

indicates whether the invited people will join the target Room as players or spectators

params

optional SFSObject containing custom data about the invitation (e.g. custom message, game info etc…)

expirySeconds

how much time each invitee has to reply, in seconds (suggested = 30-60 secs)

targetRoom

the target Room for the invitation

Discussion

Sends an invitation to join an existing Room.

Declared In

JoinRoomInvitationRequest.h