logo
On this page

ZegoRoomConfig

2026-03-13

ZegoRoomConfig

Advanced room configuration.

Details

Configure maximum number of users in the room and authentication token, etc.

Declared in ZegoExpressDefines.h

Properties

maxMemberCount

maxMemberCount
nonatomic, assign unsigned int maxMemberCount

The maximum number of users in the room, Passing 0 means unlimited, the default is unlimited.

isUserStatusNotify

isUserStatusNotify
nonatomic, assign BOOL isUserStatusNotify

Whether to enable the user in and out of the room callback notification [onRoomUserUpdate], the default is off. If developers need to use ZEGO Room user notifications, make sure that each user who login sets this flag to true

token

token
nonatomic, copy NSString * token

The token issued by the developer's business server is used to ensure security. For the generation rules, please refer to Using Token Authentication, the default is an empty string, that is, no authentication. In versions 2.17.0 and above, if appSign is not passed in when calling the [createEngine] API to create an engine, or if appSign is empty, this parameter must be set for authentication when logging in to a room.

capabilityNegotiationTypes

capabilityNegotiationTypes
nonatomic, assign unsigned int capabilityNegotiationTypes

The bitmask marker for capability negotiation, refer to enum [ZegoRoomCapabilityNegotiationTypesBitMask], when this param converted to binary, 0b01 that means 1 << 0 for enable the capability negotiation of all user in the room, 0x10 that means 1 << 1 for enable the capability negotiation of publisher in the room. The masks can be combined to allow different types of capability negotiation.

roomType

roomType
nonatomic, assign unsigned int roomType

The type of the room, generally, it can be ignored and set to 0.

Methods

defaultConfig

static
defaultConfig
+ (instancetype)defaultConfig;
Create a default room configuration
Declared in ZegoExpressDefines.h

The default configuration parameters are: the maximum number of users in the room is unlimited, the user will not be notified when the user enters or leaves the room, no authentication.

ZegoRoomConfig instance

Previous

zegoroirect

Next

zegoroomextrainfo

On this page

Back to top