Skip to content

Latest commit

 

History

History
172 lines (124 loc) · 8.25 KB

README_zh-CN.md

File metadata and controls

172 lines (124 loc) · 8.25 KB

⭐️ 适用于 iOS、Android、PC、Web(WebAssembly)及其他平台 ⭐️

🧩 Features

OpenIM-SDK-core is the core SDK of OpenIM, serving as the cross-platform foundation for all open-source OpenIM SDKs (excluding mini web). All open-source OpenIM SDKs (except mini web) are built upon this core layer, ensuring consistency, stability, and seamless cross-platform integration.

  • Network management with intelligent heartbeat

  • Message encoding and decoding

  • Local message storage

  • Relationship data synchronization

  • IM message synchronization

  • Cross-platform communication and callback management

  • Supported Platforms

    • Windows
    • MacOS
    • Linux
    • iOS
    • Android
    • Web (WebAssembly)
    • Mini Web

Quickstart

Note: This section guides you on how to quickly connect to the server and get OpenIM-SDK-core running.

🚀 Connect to the Server and Run

Follow these steps to quickly set up and run OpenIM-SDK-core by simulating an app environment using test files.

  1. Enter the test directory
     # This folder contains unit test files for all interface functions of OpenIM-SDK-core,  
     # used to simulate an app connecting to the server for login testing.  
    cd test
  2. Modify the configuration file

    Set up your own server beforehand.

  • Open the config file in the test directory.
  • Update the following fields with your server information:
     {
     "APIADDR": "http://your-server-api-address",
     "WSADDR": "ws://your-server-websocket-address",
     "UserID": "your-test-user-id"
     }
    
  1. Run test functions to simulate an app using the SDK
  • 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).
    go test -run TestFunctionName
  • Example: Running the login test
    go test -run Test_GetAllConversationList

Now, you can use the test cases to simulate real SDK usage, just like an actual app.

📦 Build and Package for Different Platforms

Once the SDK is tested successfully, you can build and package it for various platforms:

  • Android/iOS

Refer to this guide for detailed instructions on building and packaging for Android and iOS.

  • WebAssembly

Navigate to the wasm/cmd directory and run the following command to build the WebAssembly package:

make wasm  # Ensure Go is installed

If you are on Windows, use the following command instead:

mingw32-make wasm  # Ensure MinGW64 is installed
  • Windows, MacOS, Linux

Refer to this repository for platform-specific build instructions.

Contributing & Development

OpenIM Our goal is to build a top-level open source community. We have a set of standards, in the Community repository.

If you'd like to contribute to this openim-sdk-core repository, please read our contributor documentation.

community meeting

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!

We take notes of each biweekly meeting in GitHub discussions, and our minutes are written in Google Docs.

openim-sdk-core maintains a public roadmap. 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.

about OpenIM

common

OpenIM Links

Contains some common parts of the OpenIM community.

SDKs

  • openim-sdk-core: A cross-platform SDK implemented in golang that can be used in iOS, Android, PC, and other platforms.
  • Open-IM-SDK-iOS: An iOS SDK generated based on openim-sdk-core, available for developers to reference.
  • Open-IM-SDK-Android: An Android SDK generated based on openim-sdk-core, available for developers to reference.
  • Open-IM-SDK-Flutter: A Flutter SDK generated based on Open-IM-SDK-iOS and Open-IM-SDK-Android, available for developers to reference.
  • 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.

Demos

  • Open-IM-iOS-Demo: An iOS demo based on Open-IM-SDK-iOS, available for developers to reference.
  • Open-IM-Android-Demo: An Android demo based on Open-IM-SDK-Android, available for developers to reference.
  • Open-IM-Flutter-Demo: A Flutter demo based on Open-IM-SDK-Flutter, available for developers to reference.

Used By

OpenIM is used by the following companies ,let's write it down in ADOPTER.

Please leave your use cases in the comments here.

License

For more details, please refer to here.

Thanks to our contributors!