You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: i18n/en/docusaurus-plugin-content-docs-sdks/current/quickstart/uniapp.mdx
+22-28Lines changed: 22 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,46 +9,44 @@ sidebar_position: 6
9
9
10
10
We strongly recommend that you first run the framework-related examples we have prepared for you [DEMO](https://github.com/openimsdk/open-im-uniapp-demo). This will not only allow you to intuitively experience the functionality of OpenIMSDK but also help you quickly identify and resolve issues during the actual integration process.
11
11
12
-
## ❗️Tips
12
+
## ❗️Common Questions
13
13
14
-
### 1. Server Preparation
14
+
### 1. Developing Only H5 and Mini Programs
15
15
16
-
- If you are using the [pure JS version SDK](/sdks/quickstart/miniProgram), your server(OpenIM Server) version needs to be greater than 3.8.2.
16
+
- If you are not developing for the App platform, use the [JSSDK](/sdks/quickstart/miniProgram) for H5 and Mini Program development. ***No need***to follow the steps below.
17
17
18
-
### 2. Developing Cross-Platform Applications (APP, H5, Mini Programs) with Uni
18
+
### 2. Using Uni for Multi-Platform Development (APP, H5, Mini Programs)
19
19
20
-
-The latest npm package now supports the development of cross-platform applications on uni-app. However, it requires the use of **conditional compilation** syntax. It is recommended to refer to the demo before starting development, as it demonstrates how to develop in a cross-platform scenario.
20
+
-To run on iOS and Android, it is ***mandatory*** to install native plugins. The middle layer `openim-uniapp-polyfill` combines App native plugins and JSSDK capabilities, enabling unified development across APP, H5, and Mini Programs with the same codebase (SDK and im-server version >= 3.8.2).
21
21
22
-
### 2. Development for H5/Mini Programs Only
22
+
### 3. About Dependencies
23
23
24
-
-If you are developing for H5 and Mini Programs (or native Mini Programs) using uniapp, simply use the [pure JS version SDK](/sdks/quickstart/miniProgram)***without*** following the steps below.
24
+
-**@openim/client-sdk**: JSSDK, required for running H5 and Mini Programs.
25
25
26
-
---
26
+
-**App native language plugins**: Required for running on iOS and Android.
27
+
28
+
-**openim-uniapp-polyfill**: Mandatory. It encapsulates JSSDK and native plugins, enabling unified development across multiple platforms.
27
29
28
-
## Integration Steps
30
+
---
29
31
30
-
Including APP-side development, it is **essential** to follow the steps below to import the SDK using cloud plugins and npm packages. This is because the implementation for the APP side is done through [App Native Language Plugins](https://uniapp.dcloud.net.cn/plugin/native-plugin.html).
32
+
## ⚙️ Integration Steps
31
33
32
34
### 1. Add Dependencies
33
35
34
-
> Official plugins have been uploaded to the [dcloud plugin market](https://ext.dcloud.net.cn/plugin?id=6577).
36
+
- Install dependencies using npm:
35
37
36
-
- Choose the corresponding project and package name to import the SDK.
-[dcloud Plugins Market](https://ext.dcloud.net.cn/plugin?id=6577) Select the appropriate project and package name to import the SDK
37
43
38
44

39
45
40
46
- Open the `manifest.json` file in the root directory of the imported SDK project, select **App Native Plugin Configuration**, and import the cloud plugin.
### 3. Import in Project (APP、H5、Mini Program Project)
72
70
73
-
> You need to use cloud plugins to import the SDK. For the new npm package, use the [pure JS version SDK](/sdks/quickstart/miniProgram) for non-APP platforms.
74
-
75
-
- Note 1: `openim-uniapp-polyfill` version should be >= 1.2.0 ,`open-im-sdk` version should be >= 3.5.1-alpha.8 .
76
-
77
-
- Note 2: Use uniapp's method to call listeners, passing in methods from `IMSDK.IMEvents`, as there is a difference in case sensitivity between JSSDK and APP. This conversion is already handled in the npm package.
71
+
- Note 1: Use uniapp's method to call listeners, passing in methods from `IMSDK.IMEvents`, as there is a difference in case sensitivity between JSSDK and APP. This conversion is already handled in the npm package.
78
72
79
-
- Note 3: In some APIs, there may be differences between platforms due to platform support. When using them, check the documentation for the respective platform's API and note the differences:
73
+
- Note 2: In some APIs, there may be differences between platforms due to platform support. When using them, check the documentation for the respective platform's API and note the differences:
80
74
- Depending on the platform, pass the correct `platformID`.
81
75
- Login API parameters may vary.
82
76
- On APP you need to [initSDK](/sdks/api/initialization/initSDK) before using it.
0 commit comments