TIMInit

Introduction

Init IM SDK

You need to prepare a SDKAppID.

After the SDK is initialized successfully, you need to add the required event listener to avoid missing messages.

Parameter details

Parameter name Parameter type Required Description
initParams initParam yes Param of initializing IM SDK

Returned template

Promise<number>

data:number

Return value details

name type description
data number Request result: Error codes. 0 means success.

Code example

import TimRender from "im_electron_sdk/dist/renderer";
const timRenderInstance = new TimRender();
import { initParam } from "im_electron_sdk/dist/interfaces"
let config_path = "";
let param: initParam = {
    config_path: config_path  // optional
};
let { code } = await timRenderInstance.TIMInit(param);
if (code == 0) {
    // success
}

results matching ""

    No results matching ""