erxes iOS SDK is a secure, lightweight, and customizable iOS SDK that lets you embed a fully-featured customer messenger into your iOS application. Built on Swift and SwiftUI, it connects to the erxes platform and gives your users real-time chat, AI agent support, knowledge base access, and more — all inside your app.
Documentation | Join our community
- Real-time Messenger — Live chat powered by WebSocket with automatic reconnection and exponential backoff
- AI Agent Support — Integrated bot conversations with typing indicators and persistent menus
- Floating Launcher Button — Draggable
MessengerLaunchButtonthat snaps to top-right or bottom-right corner - Attachment Uploads — Photo picker with upload progress thumbnails shown inline before the message sends
- Instagram-style Timestamps — Swipe left to reveal per-message timestamps without leaving the conversation
- Knowledge Base & FAQ — Browse and search your erxes knowledge base articles in-app
- Tickets — Create and track support tickets directly from the messenger
- Offline Caching —
CachedAsyncImagewith NSCache + off-thread ImageIO downsampling; no UI-thread decode - Keyboard Native — Zero-lag keyboard avoidance via
.safeAreaInset; no customKeyboardObserver
Platform:
- iOS 16.0+
- Xcode 15+
Swift:
- Swift 5.9+
Dependencies (resolved via SPM):
- Apollo iOS
>= 1.0.0 - SDWebImageSwiftUI
>= 3.0.0
erxes backend:
- A running erxes instance with a configured Messenger integration
- Your
integrationIdand server URL from the erxes admin panel
In Xcode: File → Add Package Dependencies… and enter:
https://github.com/erxes/erxes-ios-sdk
Or add it directly to your Package.swift:
dependencies: [
.package(url: "https://github.com/erxes/erxes-ios-sdk", from: "0.30.0")
],
targets: [
.target(
name: "YourApp",
dependencies: ["MessengerSDK"]
)
]Call this once at app launch (e.g. in your App initializer or AppDelegate):
import MessengerSDK
MessengerSDK.configure(
MessengerConfig(
endpoint: "https://your.erxes.instance",
integrationId: "YOUR_INTEGRATION_ID"
)
)MessengerSDK.setUser(MessengerUser(
email: "user@example.com",
name: "Jane Doe"
))The easiest way to expose the messenger is the draggable MessengerLaunchButton. Drop it as an overlay on your root view:
import MessengerSDK
struct ContentView: View {
@ObservedObject private var sdk = MessengerSDK.shared
var body: some View {
YourRootView()
.overlay {
if sdk.isReady {
MessengerLaunchButton()
.transition(.scale(scale: 0.5).combined(with: .opacity))
}
}
.animation(.spring(response: 0.4, dampingFraction: 0.7), value: sdk.isReady)
}
}The button snaps to the top-right or bottom-right corner — users can drag it between the two positions.
If your app isn't SwiftUI (UIKit, React Native, Flutter), call showLauncher() to float the same draggable button in a transparent overlay window above your content. Touches outside the button pass straight through, and it appears automatically once the connect handshake succeeds.
MessengerSDK.showLauncher() // e.g. in AppDelegate / SceneDelegate after configure()
MessengerSDK.hideLauncher() // remove it (e.g. on logout)MessengerSDK.showMessenger(from: yourViewController)Please read our contributing guide and code of conduct before submitting a Pull Request to the project. To report a security issue, see our security policy.
For general help using erxes, please refer to the erxes documentation. For additional help, you can use one of these channels:
- Discord — Live discussion with the community
- GitHub — Bug reports and contributions
- Feedback / Issues — Feature requests and bug reports
- Twitter — Get the news fast
This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3). See the LICENSE file for licensing information.


