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

#import <LoginRequest.h>

Inherits BaseRequest.

Instance Methods

(id) - initWithUserName:password:zoneName:params:
 

Class Methods

(id) + requestWithUserName:password:zoneName:params:
 
(id) + request
 

Properties

NSString * zoneName
 
NSString * userName
 
NSString * password
 
id< ISFSObject > params
 

Detailed Description

Join one of the Zones in the Server.

Each Zone represents a different application running independently In order to join a Zone a user name and password are usually required. If the Zone allows guest users, user name and password are not needed and a guest name will be created on the server side If the Zone uses a server side extension to handle the login, you can also send a custom SFSObject with any extra parameters.

Method Documentation

◆ requestWithUserName:password:zoneName:params:

+ (id) requestWithUserName: (NSString *)  userName
password: (NSString *)  password
zoneName: (NSString *)  zoneName
params: (id <ISFSObject>)  params 
Parameters
userNamethe user name.
passwordthe password.
zoneNamethe name of an existing Zone in the server (case sensitive, 'SimpleChat' != 'simplechat'). If no Zone is specified the SmartFox.config.zone parameter will be used.
paramsthe custom parameters (optional, if you use an Extension on server side to handle the login)
See also
[ISFSEvents onLogin:]
[ISFSEvents onLoginError:]
[SmartFox2XClient loadConfig:connectOnSuccess:]