Channel Developers

thumbnail
Category

API Reference

API Reference

ChannelIO

initialize parameter type required description application UIApplication O An instance of the Application class. Initialize the ChannelIO object. You need to invoke this method at least once before utilizing any of the other ChannelIO methods. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { ChannelIO.initialize(application) ... return true } @implementation AppDelegate - (BOOL)application:(UIApplication
ChannelIO

Delegate

The delegate allows the reception of event callbacks from the SDK. Ensure that the delegate object isn’t nil. Here's an example: class ViewController: CHTChannelPluginDelegate { override func viewDidLoad() { ... ChannelIO.delegate = self ... } } [ChannelIO setDelegate:self]; onShowMessenger Invoked when the Messenger is displayed. Examples include: - calls showMessenger - calls openChat - When the user opens messenger through Channel button class ViewController: CHTChannelPluginDelegate { func o
Delegate

Callbacks

BootCallback Callback of the ChannelIO.boot. It provides information about the result of boot. parameter type description bootStatus CHTBootStatus A status value of the boot result. user CHTUser User data when the boot succeeds. UserUpdateCallback Callback for user updates. It provides information about the result of the user update. parameter type description user CHTUser User data when the user update succeeds. error Error when user update fails. It is utilized in the following functions: - Ch
Callbacks

Models

CHTBootConfig 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
Models