Chat UIKit iOS UIKit v3
Chat UIKit iOS UIKit
Chat UIKit
iOS UIKit
Version 3

Global classes

Copy link

The following shows classes with set values and data that are applied globally to the entire Sendbird UIKit for iOS.

SBUUser

Copy link

The SBUUser class contains user information for Sendbird UIKit for iOS. This can be created through User, Member and Sender. The properties of the classes include userId, nickname, and profileURL values. For member types, the isOperator and isMuted properties are also included.

let user = SBUUser(
    userId: {USER_ID},
    nickname: {NICKNAME},
    profileURL: {PROFILE_URL}
)

Note: Learn more about the classes in the API reference page.

SBUGlobals

Copy link

SBUGlobals is a global class that allows you to set user data such as applicationId, accessToken, and currentUser and feature data such as imageCompressionRate, and replyType that are used across the entire UIKit. You can also decide whether to turn on some features like message grouping and user profile through SBUGlobals.

The values of SBUGlobals must be set before the client app is used. If you need to make changes while the app is running, make sure the values are set before the features are used.

SBUGlobals.currentUser = {USER}
SBUGlobals.isMessageGroupingEnabled = true

Note: Learn more about the class in the API reference page.

SBUGlobalCustomParams

Copy link

You can set global parameters used in group channels and open channels across the UIKit through various builders of SBUGlobalCustomParams. The values of SBUGlobalCustomParams must be set before the client app is used. If you need to make changes while the client app is running, make sure the values are set before the features are used.

SBUGlobalCustomParams.groupChannelParamsCreateBuilder = { params in
    params?.isDistinct = true
}

Note: Learn more about the builders and the class in the API reference page.

SBUAvailable

Copy link

You can see the attributes that are set in the Sendbird application through the SBUAvailable class.

Note: Learn more about the class in the API reference page.

On this page