updateLoginToken method

FutureOr<int> updateLoginToken(
  1. NSString token
)

@detail api @author hanchenchen.c @brief Updates the Token used by the user to log in.
Token used by the user to log in has a certain valid period. When the Token expires, you need to call this method to update the login Token information.
If login:uid:{@link #ByteRTCEngine#login:uid} is called with an expired Token, the login fails and the local user will receive rtcEngine:onLoginResult:errorCode:elapsed:{@link #ByteRTCEngineDelegate#rtcEngine:onLoginResult:errorCode:elapsed} about corresponding error code. You need to reacquire a Token and update it with this method. @param token
Updated dynamic key @return - 0: Success. - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details @note - If the token is invalid and the login fails, call this method to update the token, and the SDK will automatically log in again. The user does not need to call the login:uid:{@link #ByteRTCEngine#login:uid} method. - Token expires, if you have successfully logged in, it will not be affected. An expired Token error will be notified to the user the next time you log in with an expired Token, or when you log in again due to a disconnection due to poor local network conditions.

Implementation

FutureOr<int> updateLoginToken(NSString token) async {
  return await nativeCall('updateLoginToken:', [token]);
}