WuKongIM Docs

WuKongEasySDK

Choose an iOS, Android, Flutter, or Web quickstart and use a pinned release to complete an online Alice/Bob messaging loop.

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

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 needChoose the full WuKongIMSDK when you also need
WebSocket connection and automatic reconnectA local message database and offline recovery
Online messages in person or group ChannelsConversations, unread counts, and message synchronization
Send results and realtime message eventsPush, multi-device behavior, and the broader platform API
Product-owned UI, persistence, and receiptsMore 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.

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"
}
FieldOwner and constraint
uidStable user identity confirmed by the product backend; Alice and Bob use different values
tokenShort-lived and revocable, scoped to this identity's connection, with no Product HTTP management authority
websocketUrlSelected by the backend from deployment configuration or a trusted routing result; production uses wss://

Complete Authentication & Tokens first. Saving /user/token does not automatically add production-grade CONNECT validation to the default composition. Your deployment needs a trusted validator and evidence that invalid, expired, and revoked tokens are rejected.

Alice/Bob acceptance loop

All four platforms follow the same minimal path:

  1. Obtain separate uid, short-lived token, and websocketUrl values for Alice and Bob.
  2. Create the clients in two independent devices, processes, or browser contexts by following the platform quickstart.
  3. After both sides report a successful connection, have Alice send a text JSON payload to the person Channel bob.
  4. Retain Alice's send result; on Bob, verify fromUid, the Channel, and the payload in the realtime message event.
  5. Send from Bob to Alice and prove the reverse direction.
  6. 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

TaskiOSAndroidFlutterWeb
Create and initializeApplication-owned WuKongEasySDK instanceProcess singleton via getInstance() + initApplication-owned singleton + initOne WKIM instance per identity or browser context
Listener ownershipRetain each EventListener tokenRetain the same listener objectRetain the same callback referencePass the same function reference to on and off
Allow sendAfter onConnectAfter CONNECTAfter the connect eventAfter the Connect event
Account exitRemove tokens and disconnectRemove listeners and disconnect; account switching must handle the singleton limitRemove listeners, disconnect, then disposeoff, then destroy

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.

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.

PlatformVerified example revisionRelationship to the release
Weba055b3667247333b6b3183249f5d5929673dfd53Included in released v2.0.4
Android7134bbd0263fd01d9e7f71b7bd05b226f75b2292Included in released v1.0.5
iOS40014c16c0becd390c105098d359048901f4d87cIncluded in released v1.1.1
Flutter98ab8f3d9a1ad53f40c32caef0979845a37ae9a6The 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

PlatformPinned release and source revisionOfficial distribution
iOSv1.1.1 · ca688fcac2c4cd8d6f8e8163faf165376b520ba9Release · CocoaPods
Androidv1.0.5 · 61ae6dc6d0077b15e47cda1fd530296b97a06a7aRelease · Maven Central
Flutterv1.1.0 · 98ab8f3d9a1ad53f40c32caef0979845a37ae9a6Release · pub.dev
Webv2.0.4 · 9c03c98c725982fac224cd1d3b52456eae983975Release · npm

Released-package runtime evidence

PlatformExact registry artifactRuntimeResult
Webeasyjssdk@2.0.4Chrome 151; hosted Node.js peerBidirectional messaging, SENDACK, and disconnect passed
Androidcom.githubim:easysdk-android:1.0.5Android 14 / API 34 EmulatorMaven resolution, instrumentation bidirectional messaging, and disconnect passed
iOSWuKongEasySDK 1.1.1iOS SimulatorCocoaPods resolution, bidirectional messaging, and disconnect passed
Flutterwukong_easy_sdk 1.1.0iOS Simulatorpub.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:

PlatformFix provenance
iOSPR #3 · b7ec4440b940539bee213f95a3be74948f4b9fb8
AndroidPR #3 · e984c7374a0e11f5d109ad3dbfdea599907735ff
FlutterPR #3 · d7758c301e5289ddfa09cd09b6976c2479584b1c
WebPR #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.

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.

On this page