Login and Logout

This topic introduces the functionalities and implementation methods related to login and logout of 'Linkus SDK for iOS'.

Manual Login

/**
 *  Refer to the table below for descriptions of the values returned by the login interface
 */
- (void)login:(NSString *)account token:(NSString *)token localIP:(NSString *)localIP localPort:(NSString *)localPort
     remoteIP:(NSString *)remoteIP remotePort:(NSString *)remotePort completion:(void (^)(NSError * _Nullable error))completion;
Login interface return value description
Return Value Description
1 Failed to connect to the PBX server.
-5 No response to the login request.
403 Invalid user name or login signature.
405 Linkus UC client is disabled.
407 This account has been locked.
416 Access to the requested IP address is prohibited ( Allowed Country / Region IP Access Protection is enabled).

Automatic login

- (void)autoLogin API_AVAILABLE(ios(11.0));

Logout

- (void)logout:(void (^)(NSError * _Nullable error))completion;

SDK notification callbacks

/**
 *  Login callback
 */
- (void)onLoginStep:(LoginStep)step;

/**
 *  Forced logout callback
 */
- (void)onKickStep:(KickReason)code;