Open bobo999-craate opened 1 month ago
To integrate the @openim/electron-client-sdk
into the Electron main process, follow these steps:
Import the SDK
Import the SDK in the main process using the require
statement:
const OpenIMSDKMain = require("@openim/electron-client-sdk");
Load the Renderer Script
Make sure to import your renderer script (render.js
) in the main process. This ensures that the renderer script is correctly initialized and ready to communicate with the main process.
API Calls
Call the API within appropriate lifecycle events or response to specific events. Ensure that the platformID
parameter is a numeric value, which is necessary for the API to function correctly.
By following these guidelines, you can ensure a seamless integration of the SDK in your Electron application's main process.
OpenIM Server Version
是直接运行的命令npm install open-im-sdk-wasm @openim/electron-client-sdk --save
Operating System and CPU Architecture
Windows (AMD)
Deployment Method
Source Code Deployment
Bug Description and Steps to Reproduce
Error invoking initSDK: TypeError: Invalid value used as weak map key
Screenshots Link
你好,这个是git地址https://gitee.com/z-qiaoer/openim-apply.git,运行的话用命令npm run electron:dev;感谢大哥们帮忙解决一下