Channel Developers

Configures option for ChannelIO.boot. This model is used as a parameter for the boot method.

field

type

description

pluginKey

String

[Plugin key](doc:sdk#get-a-plugin-key) of Channel.

memberId

String?

An identifier to distinguish each member user.

memberHash

String?

A HMAC-SHA256 value of memberId. See [enabling member hash](doc:member-hash).

profile

CHTProfile?

A user’s profile.

language

CHTLanguage?

A user’s language. It is valid when creating a new user. The language of the user that already exists will not change.

unsubscribeEmail

Bool?

Sets whether to receive marketing messages via email.

unsubscribeTexting

Bool?

Sets whether to receive marketing messages via texting (SMS, LMS)

trackDefaultEvent

Bool?

Sets whether to track the default event, such as PageView.

hidePopup

Bool?

Sets whether to hide popups such as marketing popup and in-app notifications.

channelButtonOption

CHTChannelButtonOption?

An option for the Channel button. You can set the appearance and position of the Channel button. The unit of the margin is pt (point).

bubbleOption

CHTBubbleOption?

An option for popups for bubble-type marketing messages and in-app notifications. The unit of margin is pt (point.)

appearance

CHTAppearance?

Sets the appearance of SDK.

Languages that the SDK supports.

Swift
Objective-C

Configures the appearance and location of the Channel Button.

The icon's appearance can be set using the CHTChannelButtonIcon, and the position can be set to the bottom left or right. The default value for position is .right and the default value for margin is 20pt each.

Swift
Objective-C

변수명

타입

설명

icon

CHTChannelButtonIcon

Sets the appearance of the Channel Button. The default value is `.channel`. (SDK >= 11.0.0)

position

CHTChannelButtonPosition

Sets the location of the Channel button. The default value is `.right`.

xMargin

Float

Sets the x-axis base margin for the Channel Button. The units are `pt`.

yMargin

Float

Sets the y-axis base margin for the Channel Button. The units are `pt`

Sets the location of the Channel Button.

Swift

Sets the location and margin of the message and bubble-type marketing messages in the in-app. The location is set to topby default and margins are set to 20 by default.

Plaintext
// Units of x and y are pt in iOS.
let bubbleOption = CHTBubbleOption(
  position: .top, // .top or .bottom
  yMargin: 0
)
Plaintext
// Units of x and y are pt in iOS.
  CHTBubbleOption *bubbleOption = [[CHTBubbleOption alloc] init];
  [bubbleOption setPosition:CHTBubblePostitionTop]; // CHTBubblePostitionTop or CHTBubblePostitionBottom
  [bubbleOption setYMargin:0];

Sets the appearance of the Channel button icon.

Swift

A user’s profile.

field

type

description

name

String?

A name of a user.

email

String?

An email of a user.

mobileNumber

String?

A mobile number of a user.

avatarUrl

String?

An avatar URL of a user.

A user who has visited a website or app with Channel installed.

field

type

description

id

String

An identifier that Channel uses.

memberId

String?

An identifier to distinguish member users.An anonymous user's is null.

name

String?

The name of the user.

avatarUrl

String?

An avatar URL of the user.

profile

[String: Any]?

An object that contains the user’s profile.

alert

Int

The number of important notifications that the user has not read.It is displayed as a number on the Channel button.

unread

Int

The number of all unread notifications the user has.It includes the number ofalert.It is displayed as a red dot on the Channel button.

tags

[String]?

A tag list of the user.

language

CHTLanguage

A language of the user.

unsubscribeTexting

Bool

Whether to receive marketing messages via email.

unsubscribeEmail

Bool

Whether to receive marketing messages via texting(SMS,LMS)

Swift
Objective-C

Data of the in-app popup.

field

type

description

chatId

String

A chat Id of the popup.

avatarUrl

String

A avatar URL of the popup.

name

String

A name which displayed on the popup.

message

String

A message which displayed on the popup.

Swift
Objective-C

A model used for data configuration on updateUser.

field

type

description

language

CHTLanguage

A user’s language.

tags

[String]?

A user’s tag list. Overwrite with tag data you add. The maximum number is 20, and it is not case-sensitive.

profile

[String: Any]?

A user’s profile. Overwrite with profile data you add. Initialize when you set the profile value to nil.

profileOnce

[String: Any]?

A profile to add to the user. Add a new profile value if it does not exist.

unsubscribeEmail

Bool

Whether to receive marketing messages via email.

unsubscribeTexting

Bool

Whether to receive marketing messages via texting (SMS, LMS)

Examples are the following:

Swift
Objective-C

An enum object for the appearance of the SDK.

Swift
Plaintext
typedef SWIFT_ENUM(NSInteger, CHTAppearance, closed) {
  CHTAppearanceSystem = 0,
  CHTAppearanceLight = 1,
  CHTAppearanceDark = 2,
};

An enum object for the boot result.

field

description

success

The boot was successful.

notInitialized

ChannelIO.initialize was not called.

networkTimeout

The boot failed because of a network issue.

notAvailableVersion

Not a supported SDK version.

serviceUnderConstruction

Channel Talk server is under construction.

requirePayment

The channel is blocked or you need to check the subscription plan.

accessDenied

Server responded with 4xx status code.

unknown

An unknown error.

Swift
Objective-C