iOS
Use Objective-C to connect WuKongIMSDK and manage connections, messages, conversations, and channel profiles.
WuKongIMSDK is the full WuKongIM SDK for iOS. It manages the persistent connection, message delivery, local message database, conversation list, and channel profiles. Use it when your app owns the chat UI.
These guides target WuKongIMSDK 1.1.1 and use Objective-C throughout.
Before you start
Prepare:
- a reachable WuKongIM service;
- two test users, such as
aliceandbob; - a
uid,token, connectionhost, andportreturned by your application server; - an iOS project that uses CocoaPods.
Where does the token come from?
Your application server should create the token and return it to an authenticated user. Never put a WuKongIM admin secret in the app or let the app call an admin API to create tokens.
Recommended order
Quickstart
Install the SDK, connect a user, and send the first online text message.
Connection
Understand connection states, dynamic endpoints, disconnect, and logout.
Messages
Send, receive, retry, and read local messages.
Conversations
Build the chat list and maintain unread counts.
Channels
Load names, avatars, and members for direct or group chats.
Advanced
Add custom content, media upload, and remote history.
Read Core Concepts first if “channel” or “conversation” is unfamiliar. Open the API Reference when you only need a method name.