logo
On this page

ZegoUser

ZegoUser

User object.

Details

Configure user ID and username to identify users in the room. that the userID must be unique under the same appID, otherwise, there will be mutual kicks when logging in to the room. It is strongly recommended that userID corresponds to the user ID of the business APP, that is, a userID and a real user are fixed and unique, and should not be passed to the SDK in a random userID. Because the unique and fixed userID allows ZEGO technicians to quickly locate online problems.

Declared in ZegoExpressDefines.h

Properties

userID

userID
nonatomic, copy NSString * userID
  • Privacy reminder: Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
  • Caution: Only support numbers, English characters and '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', ''. Do not use '%' if you need to communicate with the Web SDK.

userName

userName
nonatomic, copy NSString * userName

User Name, a utf8 string with a maximum length of 256 bytes or less.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.

Methods

userWithUserID

userWithUserID
+ (instancetype)userWithUserID:(NSString *)userID;
Create a ZegoUser object
Declared in ZegoExpressDefines.h

userName and userID are set to match

ZegoUser instance

initWithUserID

initWithUserID
- (instancetype)initWithUserID:(NSString *)userID;
Create a ZegoUser object
Declared in ZegoExpressDefines.h

userName and userID are set to match

userWithUserID:userName

userWithUserID:userName
+ (instancetype)userWithUserID:(NSString *)userID userName:(NSString *)userName;
Create a ZegoUser object
Declared in ZegoExpressDefines.h

ZegoUser instance

initWithUserID:userName

initWithUserID:userName
- (instancetype)initWithUserID:(NSString *)userID userName:(NSString *)userName;
Create a ZegoUser object
Declared in ZegoExpressDefines.h

ZegoUser instance

Previous

zegotrafficcontrolinfo

Next

zegovideoconfig

On this page

Back to top