WuKongEasySDK
Choose an iOS, Android, Flutter, Web, C#, C++, Rust, or Python quickstart with pinned versions or source for Alice/Bob online messaging.
WuKongEasySDK uses WebSocket JSON-RPC CONNECT for a lightweight connection and online-messaging API. It fits applications that already have a product backend and own their UI and product state.
Choose a platform and send the first message
Run the official examples
Reproduce builds, bidirectional messaging, and cleanup at verified revisions.
iOS quickstart
Install exactly 1.1.1 and use one application-owned client for connect, messaging, and cleanup.
Android quickstart
Install exactly 1.0.5 and complete the loop around the process singleton and Activity lifecycle.
Flutter quickstart
Install exactly 1.1.0, retain listener references, and release them from dispose.
Web quickstart
Install exactly easyjssdk 2.0.4 and obtain connection material through a product BFF.
Rust quickstart
Install crates.io 0.1.0 and use Tokio for messaging, bounded reconnect and cleanup.
C# quickstart
Use pinned .NET 8 source, async APIs, independent clients, and await using for messaging.
C++ quickstart
vcpkg dependency installation and CMake for C++17 connections, messaging, and cleanup.
Python quickstart
Pinned source and asyncio for online messaging, heartbeat, reconnect, and cleanup.
After the platform tutorial, Alice and Bob will connect separately, exchange a text JSON payload in a person Channel, then remove listeners and connections on exit.
Check whether it fits
| Choose EasySDK when you only need | Choose the full WuKongIMSDK when you also need |
|---|---|
| WebSocket connection and automatic reconnect | A local message database and offline recovery |
| Online messages in person or group Channels | Conversations, unread counts, and message synchronization |
| Send results and realtime message events | Push, multi-device behavior, and the broader platform API |
| Product-owned UI, persistence, and receipts | More client message state owned by the SDK |
EasySDK is neither a chat UI nor a complete product backend. A successful send means the server returned a send result; it does not mean the peer received, displayed, or processed the message. If you need the broader feature set, return to SDK selection.
Rust uses one Client per identity; clones share the socket. subscribe() returns a bounded receiver, disconnect().await permits later connection, and destroy().await closes permanently. The default device category is PC 2. See the Rust quickstart for installation and lifecycle.
Before you begin: get connection material from your backend
The client must not create its own identity or call Product HTTP management routes. After product login, the trusted backend returns the minimum connection material over HTTPS:
{
"uid": "alice",
"token": "short-lived-token",
"websocketUrl": "wss://im.example.com/ws"
}| Field | Owner and constraint |
|---|---|
uid | Stable user identity confirmed by the product backend; Alice and Bob use different values |
token | Short-lived and revocable, scoped to this identity's connection, with no Product HTTP management authority |
websocketUrl | Selected by the backend from deployment configuration or a trusted routing result; production uses wss:// |
Complete Authentication & Tokens first. The default composition exactly matches each CONNECT token against the /user/token record for the same UID and device category. Your deployment must still protect that route, implement expiry and rotation policy, and prove that invalid, revoked, and product-expired tokens are rejected.
Alice/Bob acceptance loop
All platforms follow the same minimal path:
- Obtain separate
uid, short-livedtoken, andwebsocketUrlvalues for Alice and Bob. - Create the clients in two independent devices, processes, or browser contexts by following the platform quickstart.
- After both sides report a successful connection, have Alice send a text JSON payload to the person Channel
bob. - Retain Alice's send result; on Bob, verify
fromUid, the Channel, and the payload in the realtime message event. - Send from Bob to Alice and prove the reverse direction.
- Leave the page or sign out, remove listeners, and disconnect; confirm there is no duplicate event or background connection.
This loop verifies online messaging only. Send acknowledgement, realtime receipt, and product completion are three different states; model them with Messaging.
To validate the environment first, follow Run the Official Examples with the verified server and client revisions before moving tutorial code into your application.
Lifecycle differences across platforms
| Task | iOS | Android | Flutter | Web | C# |
|---|---|---|---|---|---|
| Create and initialize | Application-owned WuKongEasySDK instance | Process singleton via getInstance() + init | Application-owned singleton + init | One WKIM instance per identity or browser context | Independent WKIM instance |
| Listener ownership | Retain each EventListener token | Retain the same listener object | Retain the same callback reference | Pass the same function reference to on and off | Use the same delegate with += / -= |
| Allow send | After onConnect | After CONNECT | After the connect event | After the Connect event | After ConnectAsync succeeds |
| Account exit | Remove tokens and disconnect | Remove listeners and disconnect; account switching must handle the singleton limit | Remove listeners, disconnect, then dispose | off, then destroy | Await DisposeAsync / await using |
A view may subscribe to connection state, but rebuilding the view must not create a second connection. Each platform's complete minimal example shows the correct owner and cleanup point.
C++ uses an independent WKIM instance and I/O thread. Retain ListenerId values, remove listeners at exit, and wait for disconnect() / destroy() to finish. Callbacks must never wait on SDK futures; dispatch UI and slow work to the application executor. See the C++ quickstart.
Complete before production
- Use WSS and verify certificates, reverse-proxy WebSocket Upgrade, and device-side reachability.
- Prove that expired, revoked, wrong-identity, and replayed tokens are rejected.
- Keep SDK diagnostics disabled in Release builds, then use non-production canaries to inspect device logs, the browser Console, crash reports, and collectors.
- Accept reconnect, offline recovery, deduplication, push, multi-device behavior, capacity, observability, upgrades, and rollback separately.
- Record the server revision, SDK version, platform, device, and network instead of treating one development loop as a production receipt.
Use Release Checks to close these gates.
Versions and evidence
All four source examples and released packages have run successfully
On August 31, 2026, all four official examples completed source runs against WuKongIM 5676700d2dc966fa6fc9b2f0620a6ae429adad5a. On September 1, npm 2.0.4, Maven Central 1.0.5, CocoaPods 1.1.1, and pub.dev 1.1.0 then connected to test-merge server 35f314cc2512f3f0f5d55d9677e817cb64129985 for final PR head 1c9430f15fc8844e7025df07d54ab6e80e026414 and completed Alice/Bob online bidirectional messaging plus disconnect cleanup. See the hosted released-package run; the browser package also passed separately in Chrome 151. This is still not physical-device, WSS, offline, or production-token evidence.
| Platform | Verified example revision | Relationship to the release |
|---|---|---|
| Web | a055b3667247333b6b3183249f5d5929673dfd53 | Included in released v2.0.4 |
| Android | 7134bbd0263fd01d9e7f71b7bd05b226f75b2292 | Included in released v1.0.5 |
| iOS | 40014c16c0becd390c105098d359048901f4d87c | Included in released v1.1.1 |
| Flutter | 98ab8f3d9a1ad53f40c32caef0979845a37ae9a6 | The same source as released v1.1.0 |
Source and package runs remain separate evidence
The table above proves exact source examples; the released-package run proves the archives actually resolved from each registry. The patch releases now include those source fixes and pass package acceptance, but retain the source revision, package version, server revision, and runtime whenever recording a result.
Current released versions
| Platform | Pinned release and source revision | Official distribution |
|---|---|---|
| iOS | v1.1.1 · ca688fcac2c4cd8d6f8e8163faf165376b520ba9 | Release · CocoaPods |
| Android | v1.0.5 · 61ae6dc6d0077b15e47cda1fd530296b97a06a7a | Release · Maven Central |
| Flutter | v1.1.0 · 98ab8f3d9a1ad53f40c32caef0979845a37ae9a6 | Release · pub.dev |
| Web | v2.0.4 · 9c03c98c725982fac224cd1d3b52456eae983975 | Release · npm |
Released-package runtime evidence
| Platform | Exact registry artifact | Runtime | Result |
|---|---|---|---|
| Web | easyjssdk@2.0.4 | Chrome 151; hosted Node.js peer | Bidirectional messaging, SENDACK, and disconnect passed |
| Android | com.githubim:easysdk-android:1.0.5 | Android 14 / API 34 Emulator | Maven resolution, instrumentation bidirectional messaging, and disconnect passed |
| iOS | WuKongEasySDK 1.1.1 | iOS Simulator | CocoaPods resolution, bidirectional messaging, and disconnect passed |
| Flutter | wukong_easy_sdk 1.1.0 | iOS Simulator | pub.dev hosted resolution, bidirectional messaging, and disconnect passed |
Application dependencies use only these exact versions—never latest or a broad version range. All four official releases include logging-security changes that leave diagnostics off by default and sanitize enabled output:
| Platform | Fix provenance |
|---|---|
| iOS | PR #3 · b7ec4440b940539bee213f95a3be74948f4b9fb8 |
| Android | PR #3 · e984c7374a0e11f5d109ad3dbfdea599907735ff |
| Flutter | PR #3 · d7758c301e5289ddfa09cd09b6976c2479584b1c |
| Web | PR #6 · 3ebf505734c5b6764b30eac011f0b7a5024c89e8 |
The task sequence was calibrated from the legacy EasySDK overview, iOS, Android, Flutter, and Web pages. The released source and distributions above remain authoritative for APIs, versions, and security boundaries.
C# / NuGet integration
WuKongEasySDK-CSharp provides an independent .NET 8+ client through the WuKongEasySDK 1.0.0 NuGet package. Create it with new WKIM / WKIM.Init, authenticate with ConnectAsync, send with SendAsync, manage events with += / -=, and await DisposeAsync or use await using on exit. Its default device category is PC 2.
C# is available on nuget.org. Follow the C# quickstart to install exact version 1.0.0, or build a pinned project reference or local NuGet package. Its real-process verification uses WuKongIM 132e46209 and remains separate from the four historical registry-package receipts above.
C++ vcpkg and pinned source
The C++ repository has project version 0.1.0. This tutorial pins source 3e367a908f42385ab9306f9708b7456399cace7d, installed through the WuKongIM-maintained vcpkg Git registry or CMake source integration; no prebuilt SDK archive or inclusion in Microsoft’s curated catalog is claimed. It follows JS v2.0.4 and completed C++/C++ and C++/JS online bidirectional messaging, reconnect, invalid-token rejection, and presence cleanup against WuKongIM 132e46209d98fa0425cc0f88e7a97080cdad044d, plus separate WS/WSS protocol tests. See the C++ validation record for environment and scope. This source evidence is separate from the historical four-platform released-package acceptance above.
Next
First run the official examples, then choose a platform for application integration. If you need offline messages, conversations, unread state, or broader platform APIs, switch to the full SDK.
Python source integration
WuKongEasySDK-Python is project version 0.1.0, pinned at c8cf8b0e66b2b684fc30eecd0f2aac8c0e25c04a, using Python 3.11+ and asyncio. Install from source; there is no PyPI release yet. It completed Python/Python and actual JS 2.0.4 bidirectional messaging, heartbeat, reconnect, invalid-Token rejection, and online cleanup against WuKongIM 0348c0539bbee420a859439695acdac911afa854, a Token-authenticated 256-hash-slot single-node cluster. See the Python quickstart for steps and validation scope. This source evidence is independent of the historical four-platform package acceptance.