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

#import <SFSInvitation.h>

Inherits NSObject, and <Invitation>.

Instance Methods

(id- initWithInviter:invitee:secondsForAnswer:params:
 

Class Methods

(id+ invitationWithInviter:invitee:secondsForAnswer:params:
 
(id+ invitationWithInviter:invitee:
 

Protected Attributes

NSInteger _id
 
id< User > _inviter
 
id< User > _invitee
 
NSInteger _secondsForAnswer
 
id< ISFSObject > _params
 

Properties

NSInteger id
 
id< User > inviter
 
id< User > invitee
 
NSInteger secondsForAnswer
 
id< ISFSObject > params
 

Detailed Description

An Invitation object provides the ability to send a generic invitation for a specific event going on in your application, be it a game, visiting a personal Room or another location of the virtual world etc...

The SFS2X Invitation Manager is very simple to use. All you need to provide is:

  • inviter: the User starting the invitation (null == Server)
  • invitee: the User to invite
  • secondsForAnswer: the amount of time (in seconds) that the invitee has to accept/refuse the invitation. (default is 15 sec)
  • params: any custom params to send with the invitation (e.g. a message, game name etc...)
See also
InviteUsersRequest

Method Documentation

◆ initWithInviter:invitee:secondsForAnswer:params:

- (id) initWithInviter: (id <User>)  inviter
invitee: (id <User>)  invitee
secondsForAnswer: (NSInteger)  secondsForAnswer
params: (id <ISFSObject>)  params 
Parameters
inviterthe User that sends the Invitation
inviteethe User that receives the Invitation
secondsForAnswerthe number of seconds allowed for the Invitee to reply (recommended range: 15-40 seconds)
paramscustom params to send with the invitation

◆ invitationWithInviter:invitee:

+ (id) invitationWithInviter: (id <User>)  inviter
invitee: (id <User>)  invitee 
Parameters
inviterthe User that sends the Invitation
inviteethe User that receives the Invitation

◆ invitationWithInviter:invitee:secondsForAnswer:params:

+ (id) invitationWithInviter: (id <User>)  inviter
invitee: (id <User>)  invitee
secondsForAnswer: (NSInteger)  secondsForAnswer
params: (id <ISFSObject>)  params 
Parameters
inviterthe User that sends the Invitation
inviteethe User that receives the Invitation
secondsForAnswerthe number of seconds allowed for the Invitee to reply (recommended range: 15-40 seconds)
paramscustom params to send with the invitation

Property Documentation

◆ id

- (NSInteger) id
readwritenonatomicassign

The id of the invitation

◆ invitee

- (id< User >) invitee
readnonatomicweak

The invited User

◆ inviter

- (id< User >) inviter
readnonatomicweak

The inviter User

◆ params

- (id< ISFSObject >) params
readnonatomicweak

A custom set of parameters. Can be used to provide a message for the invitation and any other relevant data

◆ secondsForAnswer

- (NSInteger) secondsForAnswer
readnonatomicassign

The amount of time (seconds) allowed to reply to the invitation