Skip to content

juggleim/imsdk-ios

JuggleIM

JuggleIM iOS SDK

High-performance, open-source IM SDK for iOS.
Built on a custom binary protocol over WebSocket. Powers chat, group, live chatroom, RTC signaling and moments out of the box.

Why JuggleIM · Features · Quick Start · Docs · Ecosystem · Community

English | 简体中文


Why JuggleIM

JuggleIM provides the iOS client SDK for the JuggleIM realtime messaging stack. It is designed for production chat apps that need connection management, reliable message delivery, custom message types, and optional call integrations.

  • Custom server configuration with app key initialization.
  • Connection, reconnection, conversations, history, unread counts, and receipts.
  • Text, image, file, custom, and business notification messages.
  • One-to-one chat, group chat, chatroom, and live call workflows.
  • Optional call plugins for Zego, Agora, and LiveKit.

Features

  • Core IM capabilities: connection management, reconnect, message send/receive, history, and unread state.
  • Message types: text, image, file, custom, and notification messages.
  • Extension points: custom content types, push token registration, and call integrations.
  • Demo app: QuickStart includes login, chat, group, custom message, and call flows.

Quick Start

Install

For local development from this repository, add the podspecs by path in your app target:

pod 'JuggleIM', :path => './JuggleIM'
pod 'JZegoCall', :path => './JZegoCall'         # optional

Initialize

Initialize the SDK in AppDelegate:

import JuggleIM

JIM.shared().setServerUrls(["wss://your-im-server"])
JIM.shared().setConsoleLogLevel(.verbose)
JIM.shared().initWithAppKey("your_app_key")

Connect and send a message

Connect with the IM token issued by your backend:

JIM.shared().connectionManager.connect(withToken: "user_im_token")

Send a text message:

let textMessage = JTextMessage(content: "Hello from JuggleIM")
let conversation = JConversation(conversationType: .private, conversationId: "TARGET_USER_ID")

let message = JIM.shared().messageManager.sendMessage(
    textMessage,
    in: conversation
) { sentMessage in
    print("sent:", String(describing: sentMessage))
} error: { code, errorMessage in
    print("error:", code.rawValue, String(describing: errorMessage))
}

Push tokens

If you use push notifications, register APNs and VoIP tokens after login:

JIM.shared().connectionManager.registerDeviceToken(deviceToken)
JIM.shared().connectionManager.registerVoIPToken(pushCredentials.token)

Repository Layout

Directory Description
JuggleIM Core IM SDK
QuickStart iOS demo app and sample business logic
JZegoCall Zego call plugin
JAgoraCall Agora call plugin
JLiveKitCall LiveKit call plugin

Run the Demo

  1. Open QuickStart/QuickStart.xcworkspace in Xcode.
  2. Make sure CocoaPods dependencies are installed.
  3. Build and run the QuickStart scheme.
  4. Configure appKey, IM server URL, and optional call credentials for your environment.

Useful entry points:

  • QuickStart/QuickStart/AppDelegate.swift
  • QuickStart/QuickStart/ViewController.swift
  • QuickStart/QuickStart/Sections/GroupChannel

Documentation

Ecosystem

Project Description
im-web-sdk Web SDK
im-server Self-hosted IM backend
im-admin Admin console
im-android-sdk Android SDK
im-ios-sdk iOS SDK
web-im-demo Web integration demo

Community

License

Copyright © JuggleIM. Licensed under the Apache License 2.0.

About

JuggleIM SDK for iOS — IM Chat, private chat, groups, chatrooms, media messages, read receipts, multi-device sync, and push notifications.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages