These APIs are encapsulated from IM cross-platform C APIs and kept consistent with C APIs.
Windows、Mac、Linux(uos)
// Main process
const TimMain = require('im_electron_sdk/dist/main')
const sdkappid = 0;// You can apply for it in the IM console
const tim = new TimMain({
sdkappid:sdkappid
})
// Rendering process
const TimRender = require('im_electron_sdk/dist/render')
const timRender = new TimRender();
// Initialize
timRender.TIMInit()
// Log in
timRender.TIMLogin({
userID:"userID",
userSig:"userSig" // See Generating UserSig
}).then(()=>{
// success
}).catch(err=>{
// error
})
// Other APIs
1. You cannot repeatedly initialize and log in to the SDK when several rendering processes use it.
xxx/manager on the right are API documents. interface/xxx on the right are interfaces of API methods, which contain notes for parameters.
Generated using TypeDoc