Skip to content

Commit 17cf52f

Browse files
authored
docs: readme doc update and add doc for gomobile compile sdk core. (#854)
* docs: update readme file. Signed-off-by: Gordon <[email protected]> * docs: go mobile readme update. Signed-off-by: Gordon <[email protected]> --------- Signed-off-by: Gordon <[email protected]>
1 parent 4afbf00 commit 17cf52f

File tree

3 files changed

+382
-56
lines changed

3 files changed

+382
-56
lines changed

README.md

+80-54
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</b>
55
</h1>
66
<h3 align="center" style="border-bottom: none">
7-
⭐️ Used in IOS, Android, PC and other platforms ⭐️ <br>
7+
⭐️ Used in iOS, Android, PC, Web (WebAssembly) and other platforms ⭐️ <br>
88
<h3>
99

1010
<p align=center>
@@ -27,61 +27,87 @@
2727

2828
----
2929

30-
## 🧩 Awesome features
31-
32-
OpenIM-SDK-core is a core SDK of OpenIM.
33-
34-
1. Manage WebSocket long connections, responsible for creating, closing and reconnecting connections.
35-
2. Encoding and decoding. Encode and decode messages in binary format to achieve cross-language compatibility.
36-
3. Implement basic protocols of OpenIM, such as login, push, etc.
37-
4. Provide an event handling mechanism to convert received messages into corresponding events and pass them to upper layer applications for processing.
38-
5. Cache management. Manage user, group, blacklists, and other cache information.
39-
6. Provide basic IM function APIs such as sending messages, creating groups, etc. Hide the underlying implementation details from the upper layer application.
30+
## 🧩 Features
31+
<!--BEGIN_DESCRIPTION-->
32+
OpenIM-SDK-core is the core SDK of OpenIM, serving as the cross-platform foundation for all open-source OpenIM SDKs (excluding mini web).
33+
All open-source OpenIM SDKs (except mini web) are built upon this core layer, ensuring consistency, stability, and seamless cross-platform integration.
34+
<!--END_DESCRIPTION-->
35+
36+
- [x] Network management with intelligent heartbeat
37+
- [x] Message encoding and decoding
38+
- [x] Local message storage
39+
- [x] Relationship data synchronization
40+
- [x] IM message synchronization
41+
- [x] Cross-platform communication and callback management
42+
43+
- Supported Platforms
44+
- [x] Windows
45+
- [x] MacOS
46+
- [x] Linux
47+
- [x] iOS
48+
- [x] Android
49+
- [x] Web (WebAssembly)
50+
- [ ] Mini Web
4051

4152

4253
## Quickstart
4354

44-
> **Note**: You can get started quickly with openim-sdk-core.
45-
46-
<details>
47-
<summary>Work with Makefile</summary>
48-
49-
```bash
50-
❯ make help # show help
51-
❯ make build # build binary
52-
```
53-
54-
</details>
55-
<details>
56-
<summary>Work with actions</summary>
57-
58-
Actions provide handling of PR and issue.
59-
We used the bot @kubbot, It can detect issues in Chinese and translate them to English, and you can interact with it using the command `/comment`.
60-
61-
Comment in an issue:
62-
63-
```bash
64-
❯ /intive
65-
```
66-
67-
</details>
68-
<details>
69-
<summary>Work with Tools</summary>
70-
71-
```bash
72-
❯ make tools
73-
```
74-
75-
</details>
76-
<details>
77-
<summary>Work with Docker</summary>
78-
79-
```bash
80-
$ make deploy
81-
```
82-
83-
</details>
84-
55+
> **Note**: This section guides you on how to quickly connect to the server and get OpenIM-SDK-core running.
56+
57+
### 🚀 Connect to the Server and Run
58+
59+
Follow these steps to quickly set up and run OpenIM-SDK-core by simulating an app environment using test files.
60+
61+
1. **Enter the `test` directory**
62+
```bash
63+
# This folder contains unit test files for all interface functions of OpenIM-SDK-core,
64+
# used to simulate an app connecting to the server for login testing.
65+
cd test
66+
```
67+
2. **Modify the configuration file**
68+
> [Set up your own server beforehand.](https://github.com/openimsdk/open-im-server.git)
69+
- Open the config file in the test directory.
70+
- Update the following fields with your server information:
71+
```json
72+
{
73+
"APIADDR": "http://your-server-api-address",
74+
"WSADDR": "ws://your-server-websocket-address",
75+
"UserID": "your-test-user-id"
76+
}
77+
78+
```
79+
3. **Run test functions to simulate an app using the SDK**
80+
- Identify the test function you want to execute (The `init` file has already completed the SDK initialization and login logic. You can now call other functions).
81+
```bash
82+
go test -run TestFunctionName
83+
```
84+
- Example: Running the login test
85+
```bash
86+
go test -run Test_GetAllConversationList
87+
```
88+
Now, you can use the test cases to simulate real SDK usage, just like an actual app.
89+
90+
91+
## 📦 Build and Package for Different Platforms
92+
93+
Once the SDK is tested successfully, you can build and package it for various platforms:
94+
95+
- **Android/iOS**
96+
97+
Refer to [this guide](./docs/gomobile-android-ios-setup-cn.md) for detailed instructions on building and packaging for Android and iOS.
98+
- **WebAssembly**
99+
100+
Navigate to the `wasm/cmd` directory and run the following command to build the WebAssembly package:
101+
```bash
102+
make wasm # Ensure Go is installed
103+
```
104+
If you are on Windows, use the following command instead:
105+
```bash
106+
mingw32-make wasm # Ensure MinGW64 is installed
107+
```
108+
- **Windows, MacOS, Linux**
109+
110+
Refer to [this repository](https://github.com/openimsdk/openim-sdk-cpp.git) for platform-specific build instructions.
85111

86112
## Contributing & Development
87113

@@ -109,13 +135,13 @@ openim-sdk-core maintains a [public roadmap](https://github.com/openimsdk/commun
109135
Contains some common parts of the OpenIM community.
110136

111137
+ https://github.com/openimsdk/automation: OpenIM Automation, cicd, and actions, Robotics.
112-
+ https://github.com/openimsdk/openim-sdk-core: The IMSDK implemented by golang can be used in IOS, Android, PC and other platforms.
138+
+ https://github.com/openimsdk/openim-sdk-core: The IMSDK implemented by golang can be used in iOS, Android, PC and other platforms.
113139
+ https://github.com/openimsdk/openim-sdk-core: Instant messaging IM server.
114140
+ https://github.com/openimsdk/community: Community Management for OpenIM.
115141

116142
### SDKs
117143

118-
+ [openim-sdk-core](https://github.com/openimsdk/openim-sdk-core): A cross-platform SDK implemented in golang that can be used in IOS, Android, PC, and other platforms.
144+
+ [openim-sdk-core](https://github.com/openimsdk/openim-sdk-core): A cross-platform SDK implemented in golang that can be used in iOS, Android, PC, and other platforms.
119145
+ [Open-IM-SDK-iOS](https://github.com/openimsdk/Open-IM-SDK-iOS): An iOS SDK generated based on openim-sdk-core, available for developers to reference.
120146
+ [Open-IM-SDK-Android](https://github.com/openimsdk/Open-IM-SDK-Android): An Android SDK generated based on openim-sdk-core, available for developers to reference.
121147
+ [Open-IM-SDK-Flutter](https://github.com/openimsdk/Open-IM-SDK-Flutter): A Flutter SDK generated based on Open-IM-SDK-iOS and Open-IM-SDK-Android, available for developers to reference.

README_zh-CN.md

+148-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<h1 align="center" style="border-bottom: none">
22
<b>
3-
<a href="https://doc.rentsoft.cn/">openim-sdk-core</a><br>
3+
<a href="https://doc.rentsoft.cn/sdks/introduction">openim-sdk-core</a><br>
44
</b>
55
</h1>
66
<h3 align="center" style="border-bottom: none">
7-
⭐️ Used in IOS, Android, PC and other platforms ⭐️ <br>
7+
⭐️ 适用于 iOS、Android、PC、Web(WebAssembly)及其他平台 ⭐️ <br>
88
<h3>
99

1010
<p align=center>
@@ -24,3 +24,149 @@
2424
</p>
2525

2626
</p>
27+
28+
----
29+
30+
31+
## 🧩 Features
32+
<!--BEGIN_DESCRIPTION-->
33+
OpenIM-SDK-core is the core SDK of OpenIM, serving as the cross-platform foundation for all open-source OpenIM SDKs (excluding mini web).
34+
All open-source OpenIM SDKs (except mini web) are built upon this core layer, ensuring consistency, stability, and seamless cross-platform integration.
35+
<!--END_DESCRIPTION-->
36+
37+
- [x] Network management with intelligent heartbeat
38+
- [x] Message encoding and decoding
39+
- [x] Local message storage
40+
- [x] Relationship data synchronization
41+
- [x] IM message synchronization
42+
- [x] Cross-platform communication and callback management
43+
44+
- Supported Platforms
45+
- [x] Windows
46+
- [x] MacOS
47+
- [x] Linux
48+
- [x] iOS
49+
- [x] Android
50+
- [x] Web (WebAssembly)
51+
- [ ] Mini Web
52+
53+
54+
## Quickstart
55+
56+
> **Note**: This section guides you on how to quickly connect to the server and get OpenIM-SDK-core running.
57+
58+
### 🚀 Connect to the Server and Run
59+
60+
Follow these steps to quickly set up and run OpenIM-SDK-core by simulating an app environment using test files.
61+
62+
1. **Enter the `test` directory**
63+
```bash
64+
# This folder contains unit test files for all interface functions of OpenIM-SDK-core,
65+
# used to simulate an app connecting to the server for login testing.
66+
cd test
67+
```
68+
2. **Modify the configuration file**
69+
> [Set up your own server beforehand.](https://github.com/openimsdk/open-im-server.git)
70+
- Open the config file in the test directory.
71+
- Update the following fields with your server information:
72+
```json
73+
{
74+
"APIADDR": "http://your-server-api-address",
75+
"WSADDR": "ws://your-server-websocket-address",
76+
"UserID": "your-test-user-id"
77+
}
78+
79+
```
80+
3. **Run test functions to simulate an app using the SDK**
81+
- Identify the test function you want to execute (The `init` file has already completed the SDK initialization and login logic. You can now call other functions).
82+
```bash
83+
go test -run TestFunctionName
84+
```
85+
- Example: Running the login test
86+
```bash
87+
go test -run Test_GetAllConversationList
88+
```
89+
Now, you can use the test cases to simulate real SDK usage, just like an actual app.
90+
91+
92+
## 📦 Build and Package for Different Platforms
93+
94+
Once the SDK is tested successfully, you can build and package it for various platforms:
95+
96+
- **Android/iOS**
97+
98+
Refer to [this guide](./docs/CHANGELOG.md) for detailed instructions on building and packaging for Android and iOS.
99+
- **WebAssembly**
100+
101+
Navigate to the `wasm/cmd` directory and run the following command to build the WebAssembly package:
102+
```bash
103+
make wasm # Ensure Go is installed
104+
```
105+
If you are on Windows, use the following command instead:
106+
```bash
107+
mingw32-make wasm # Ensure MinGW64 is installed
108+
```
109+
- **Windows, MacOS, Linux**
110+
111+
Refer to [this repository](https://github.com/openimsdk/openim-sdk-cpp.git) for platform-specific build instructions.
112+
113+
## Contributing & Development
114+
115+
OpenIM Our goal is to build a top-level open source community. We have a set of standards, in the [Community repository](https://github.com/openimsdk/community).
116+
117+
If you'd like to contribute to this openim-sdk-core repository, please read our [contributor documentation](https://github.com/openimsdk/openim-sdk-core/blob/main/CONTRIBUTING.md).
118+
119+
## community meeting
120+
121+
We welcome everyone to join us and contribute to openim-sdk-core, whether you are new to open source or professional. We are committed to promoting an open source culture, so we offer community members neighborhood prizes and reward money in recognition of their contributions. We believe that by working together, we can build a strong community and make valuable open source tools and resources available to more people. So if you are interested in openim-sdk-core, please join our community and start contributing your ideas and skills!
122+
123+
We take notes of each [biweekly meeting](https://github.com/openimsdk/Open-IM-Server/issues/381) in [GitHub discussions](https://github.com/openimsdk/Open-IM-Server/discussions/categories/meeting), and our minutes are written in [Google Docs](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing).
124+
125+
openim-sdk-core maintains a [public roadmap](https://github.com/openimsdk/community/tree/main/roadmaps). It gives a a high-level view of the main priorities for the project, the maturity of different features and projects, and how to influence the project direction.
126+
127+
## about OpenIM
128+
129+
### common
130+
131+
+ https://github.com/openimsdk/automation: OpenIM Automation, cicd, and actions, Robotics.
132+
+ https://github.com/openimsdk/community: Community Management for OpenIM
133+
134+
### OpenIM **Links**
135+
136+
Contains some common parts of the OpenIM community.
137+
138+
+ https://github.com/openimsdk/automation: OpenIM Automation, cicd, and actions, Robotics.
139+
+ https://github.com/openimsdk/openim-sdk-core: The IMSDK implemented by golang can be used in iOS, Android, PC and other platforms.
140+
+ https://github.com/openimsdk/openim-sdk-core: Instant messaging IM server.
141+
+ https://github.com/openimsdk/community: Community Management for OpenIM.
142+
143+
### SDKs
144+
145+
+ [openim-sdk-core](https://github.com/openimsdk/openim-sdk-core): A cross-platform SDK implemented in golang that can be used in iOS, Android, PC, and other platforms.
146+
+ [Open-IM-SDK-iOS](https://github.com/openimsdk/Open-IM-SDK-iOS): An iOS SDK generated based on openim-sdk-core, available for developers to reference.
147+
+ [Open-IM-SDK-Android](https://github.com/openimsdk/Open-IM-SDK-Android): An Android SDK generated based on openim-sdk-core, available for developers to reference.
148+
+ [Open-IM-SDK-Flutter](https://github.com/openimsdk/Open-IM-SDK-Flutter): A Flutter SDK generated based on Open-IM-SDK-iOS and Open-IM-SDK-Android, available for developers to reference.
149+
+ [Open-IM-SDK-Uniapp](https://github.com/openimsdk/Open-IM-SDK-Uniapp): A uni-app SDK generated based on Open-IM-SDK-iOS and Open-IM-SDK-Android, available for developers to reference.
150+
151+
### Demos
152+
153+
+ [Open-IM-iOS-Demo](https://github.com/openimsdk/Open-IM-iOS-Demo): An iOS demo based on Open-IM-SDK-iOS, available for developers to reference.
154+
+ [Open-IM-Android-Demo](https://github.com/openimsdk/Open-IM-Android-Demo): An Android demo based on Open-IM-SDK-Android, available for developers to reference.
155+
+ [Open-IM-Flutter-Demo](https://github.com/openimsdk/Open-IM-Flutter-Demo): A Flutter demo based on Open-IM-SDK-Flutter, available for developers to reference.
156+
157+
## Used By
158+
159+
OpenIM is used by the following companies ,let's write it down in [ADOPTER](https://github.com/openimsdk/community/blob/main/ADOPTERS.md).
160+
161+
Please leave your use cases in the comments [here](https://github.com/openimsdk/Open-IM-Server/issues/379).
162+
163+
## License
164+
165+
For more details, please refer to [here](./LICENSE).
166+
167+
168+
## Thanks to our contributors!
169+
170+
<a href="https://github.com/openimsdk/openim-sdk-core/graphs/contributors">
171+
<img src="https://contrib.rocks/image?repo=OpenIMSDK/openim-sdk-core" />
172+
</a>

0 commit comments

Comments
 (0)