Run the Official Examples
Use one pinned WuKongIM revision to run the Web, Android, iOS, and Flutter source examples and released packages.
This page records two reproducible evidence classes. On August 31, 2026, the source examples in all four official repositories connected to WuKongIM 5676700d2dc966fa6fc9b2f0620a6ae429adad5a; the server process-level JSON-RPC E2E also passed at that revision. On September 1, the packages resolved from npm, Maven Central, CocoaPods, and pub.dev connected to test-merge server 35f314cc2512f3f0f5d55d9677e817cb64129985 for final PR head 1c9430f15fc8844e7025df07d54ab6e80e026414 and completed Alice → Bob, Bob → Alice, and disconnect cleanup.
Source examples and released packages are separate evidence
A source run proves one repository revision; a released-package run proves the archive actually served by a registry. Web v2.0.4, Android v1.0.5, and iOS v1.1.1 now include the previously verified example and connection-lifecycle fixes, while Flutter remains on v1.1.0. Keep both evidence classes in every result.
Verified results
Released packages (September 1, 2026)
| Platform | Released package and release source | Build and runtime | Observed result |
|---|---|---|---|
| Web | easyjssdk@2.0.4 · 9c03c98c725982fac224cd1d3b52456eae983975 | Chrome 151; hosted Node.js peer | Browser and released-package-peer bidirectional messaging, SENDACK, and disconnect passed |
| Android | com.githubim:easysdk-android:1.0.5 · 61ae6dc6d0077b15e47cda1fd530296b97a06a7a | JDK 17, Android 14 / API 34 hosted emulator | Maven resolution, instrumentation bidirectional messaging, and disconnect passed |
| iOS | WuKongEasySDK 1.1.1 · ca688fcac2c4cd8d6f8e8163faf165376b520ba9 | CocoaPods 1.16.2, iOS Simulator | Pod resolution, bidirectional messaging, and disconnect passed |
| Flutter | wukong_easy_sdk 1.1.0 · 98ab8f3d9a1ad53f40c32caef0979845a37ae9a6 | Flutter 3.41.4, iOS Simulator | Hosted dependency resolution, bidirectional messaging, and disconnect passed |
The Android, iOS, and Flutter hosted jobs—and the released npm 2.0.4 peer shared by each—are recorded in the final-head released-package acceptance run.
Official source examples (August 31, 2026)
| Platform | Official example source | Build and runtime | Observed result |
|---|---|---|---|
| Web | a055b3667247333b6b3183249f5d5929673dfd53 | Node.js 22.12, Chrome 151, macOS | 61 tests passed, ESM/CJS builds passed, browser bidirectional messaging plus disconnect/reconnect passed |
| Android | 7134bbd0263fd01d9e7f71b7bd05b226f75b2292 | JDK 17, Gradle 8.4, Android 14 / API 34 emulator | Gradle tests and Debug build passed; bidirectional messaging, manual disconnect, and heartbeat-timeout semantics passed |
| iOS | 40014c16c0becd390c105098d359048901f4d87c | Xcode 16.2, iPhone 16 / iOS 18.3 Simulator | 30 tests and Release build passed; macOS/iOS scripts passed; bidirectional message content and timestamps rendered correctly |
| Flutter | 98ab8f3d9a1ad53f40c32caef0979845a37ae9a6 (v1.1.0) | Flutter 3.41.4, Dart 3.11.1, iOS Simulator | 25 tests and static analysis passed; official-example bidirectional messaging passed |
The server also passed its fixed process-level regression:
GOWORK=off go test -tags=e2e ./test/e2e/message/easy_sdk_jsonrpc \
-count=1 -timeout 2m -p=1 -vThis result covers a single-node cluster, the default 256 hash slots, JSON-RPC CONNECT, Ping, SEND/SENDACK, RECV/RECVACK, online bidirectional messaging, and client cleanup. It does not cover physical devices, WSS proxies, production-token rejection, offline synchronization, push, multi-device behavior, capacity, or long-duration stability.
1. Start the same WuKongIM revision
Start a development single-node cluster in one terminal:
git clone https://github.com/WuKongIM/WuKongIM.git
cd WuKongIM
git checkout 5676700d2dc966fa6fc9b2f0620a6ae429adad5a
cp wukongim.toml.example wukongim.toml
go run ./cmd/wukongim -config ./wukongim.tomlCheck readiness from another terminal:
curl -fsS http://127.0.0.1:5001/readyzThe default development endpoints are Product HTTP at http://127.0.0.1:5001 and the EasySDK WebSocket at ws://127.0.0.1:5200. Production must use protected HTTPS/WSS endpoints.
2. Prepare Alice and Bob
A trusted product backend should prepare each user's uid, token, and WebSocket URL. Only for a loopback development environment, a trusted terminal can call POST /user/token to create test identities. The commands below assume two native clients; change a user's device_flag to 1 when that user signs in through the Web example:
curl -fsS -X POST http://127.0.0.1:5001/user/token \
-H 'Content-Type: application/json' \
-d '{"uid":"alice","token":"alice-token","device_flag":0,"device_level":1}'
curl -fsS -X POST http://127.0.0.1:5001/user/token \
-H 'Content-Type: application/json' \
-d '{"uid":"bob","token":"bob-token","device_flag":0,"device_level":1}'Native mobile clients use APP 0, Web uses WEB 1, and desktop uses PC 2. A successful response from this endpoint does not give the default product composition production-grade CONNECT token validation. After installing a trusted validator, separately prove rejection of invalid, expired, and revoked tokens.
Choose the WebSocket URL from where the client runs:
| Client | Local development URL |
|---|---|
| Browser, Node.js, macOS app, iOS Simulator | ws://127.0.0.1:5200 |
| Android Emulator | ws://10.0.2.2:5200 |
| Physical phone | ws://<development-host LAN IP>:5200, with firewall and routing verified |
3. Run a platform example
Web
git clone https://github.com/WuKongIM/WuKongEasySDK-JS.git
cd WuKongEasySDK-JS
git checkout 9c03c98c725982fac224cd1d3b52456eae983975
npm ci
npm test
npm run build
python3 -m http.server 8080Open http://127.0.0.1:8080/example/. Use two isolated browser contexts for Alice and Bob. Do not print tokens or complete payloads to the Console.
Android
git clone https://github.com/WuKongIM/WuKongEasySDK-Android.git
cd WuKongEasySDK-Android
git checkout 61ae6dc6d0077b15e47cda1fd530296b97a06a7a
./gradlew test :example:assembleDebug
./gradlew :example:installDebugLaunch the example on an API 21+ device or emulator. An Android Emulator reaches the host at ws://10.0.2.2:5200, not localhost. Use two devices or emulators for two native identities, or use the browser example as the peer.
iOS and macOS
git clone https://github.com/WuKongIM/WuKongEasySDK-iOS.git
cd WuKongEasySDK-iOS
git checkout ca688fcac2c4cd8d6f8e8163faf165376b520ba9
swift test
swift build -c release
cd Examples/WuKongIMExample-Unified
./build.sh macos
./build.sh iosBoot an iOS Simulator, then run:
./build.sh ios --runYou can instead start the macOS variant with ./build.sh macos --run. The iOS ATS cleartext exception in the example exists only for local ws:// development; do not copy it into a production app.
Flutter
git clone https://github.com/WuKongIM/WuKongEasySDK-Flutter.git
cd WuKongEasySDK-Flutter
git checkout 98ab8f3d9a1ad53f40c32caef0979845a37ae9a6
flutter pub get
flutter analyze
flutter test
cd example
flutter pub get
flutter devices
flutter run -d <device-id>Run every target you intend to ship. An iOS Simulator result cannot stand in for Android, Web, or desktop acceptance.
The current Web, Android, and iOS release commits change only version, changelog, or release-documentation metadata above the verified sources; their example behavior source is unchanged. Flutter's release source is the previously verified revision. Use the “Official source examples” table above when reproducing the exact August 31 source receipts.
4. Rerun released-package automation
Safety Automation - EasySDK Released Package Acceptance resolves the exact four registry versions, builds the current WuKongIM, then uses the released npm package as Bob while Android API 34 and two iOS Simulator jobs complete bidirectional messaging. Trigger a rerun with:
gh workflow run easysdk-release-acceptance.yml --ref mainThe workflow checks the actual Gradle, Podfile.lock, and Dart package-config sources so a local source dependency cannot masquerade as a release. Keep real-browser acceptance as a separate Web check.
5. Complete bidirectional acceptance
- Wait for both clients to report connected before enabling send.
- Alice sends
{"type":1,"content":"hello bob"}to person Channelbob. - Alice observes SEND completion; Bob checks
fromUid,channelId,messageId, content, and timestamp. - Bob replies to person Channel
aliceto prove the reverse path. - Disconnect and reconnect, checking that each transition emits once and listeners do not duplicate messages.
- Stop the server or cut the network. The client should enter a bounded failure or reconnect state instead of hanging in Connecting.
- On page or account exit, remove listeners and call the platform's
disconnect,dispose, ordestroyoperation.
Send success, peer realtime receipt, peer display, and product handling are four different states. Design recovery and deduplication separately with Messaging.
Troubleshooting
- The Android emulator cannot connect: replace
localhostwith10.0.2.2; use the development host's LAN address on a physical phone. - A checked-out tag behaves differently from the table: verify that
git rev-parse HEADand each package-manager lockfile match the current pins. Do not let a localpath,project(':'), or cached dependency stand in for the registry artifact. - SEND succeeds but the peer sees nothing: verify that the target Channel ID equals the peer UID, both clients are online, and the receiver did not drop RECV through duplicate listeners or incorrect deduplication.
- An iOS or Android build asks for a License: accept the applicable Xcode or Android SDK Manager license and download the target runtime, then rerun the same command.
- A local token connects: that is not production authentication evidence. Continue until invalid, expired, revoked, and replayed tokens are rejected by a trusted validator.
Next step
Continue with the iOS, Android, Flutter, or Web quickstart, then use the Release Checks to close WSS, physical-device, offline, capacity, and rollback evidence.