Integrating Zendesk SDK for Mobile App Support
Zendesk SDK gives users access to live chat and ticketing directly from the app. But integration takes more than a day—not due to SDK complexity but due to initialization subtleties, conflicts with other dependencies, and customization to fit the product's design system.
Zendesk SDK Architecture
Zendesk offers two independent SDKs:
- Zendesk SDK (Support)—create tickets, view request history
- Zendesk Chat SDK—real-time live chat with agent
- Zendesk Messaging (recommended for new projects)—combines chat and tickets, works via Sunshine Conversations
For most new integrations, we recommend Messaging SDK—it replaces both previous options and supports push notifications about new agent replies.
iOS Integration (Swift)
// AppDelegate or @main App
import ZendeskSDKMessaging
import ZendeskSDK
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Zendesk.initialize(
withAppId: "YOUR_APP_ID",
clientId: "YOUR_CLIENT_ID",
zendeskUrl: "https://yoursubdomain.zendesk.com"
)
Messaging.initialize(with: Zendesk.instance!)
return true
}
Opening chat:
let messagingViewController = Messaging.instance?.messagingViewController()
present(messagingViewController!, animated: true)
Initialization issue. If Zendesk.initialize is called off the main thread—the SDK crashes with a Thread Checker warning and sometimes a cold start crash. Initialize only on main thread.
User Identification
For logged-in users, pass JWT token instead of anonymous session:
Zendesk.instance?.setIdentity(
.jwtWithToken(token: userJwtToken)
)
JWT token generated on backend with standard claims: sub (user ID), email, name. Without identification, the agent sees an anonymous user and can't link chat to account history.
Android Integration (Kotlin)
// Application.onCreate()
Zendesk.initialize(this,
appId = "YOUR_APP_ID",
clientId = "YOUR_CLIENT_ID",
zendeskUrl = "https://yoursubdomain.zendesk.com"
)
Messaging.initialize(Zendesk.instance)
// Open support screen
val intent = Messaging.instance!!.getMessagingActivity(context)
startActivity(intent)
ProGuard Conflict. Zendesk SDK requires specific keep rules. Without them—app crashes on opening chat in release build with ClassNotFoundException. Current rules are in official documentation, but AGP sometimes doesn't apply them automatically via consumerProguardFiles.
# proguard-rules.pro
-keep class zendesk.** { *; }
-keep class com.zendesk.** { *; }
Push Notifications for New Agent Replies
User closed the app—notify about new reply:
// iOS: register token with Zendesk
func application(_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Zendesk.instance?.pushNotificationsProvider?.register(
deviceToken: deviceToken,
locale: Locale.current.languageCode ?? "en"
)
}
Zendesk sends push through its own service—no need to configure a separate server mechanism. But APNS certificate or p8 key must be added to Zendesk Admin Console → Channels → Mobile SDK.
UI Customization
Zendesk Messaging SDK provides limited customization via MessagingConfiguration. For fully custom UI—look into Sunshine Conversations REST API: fetch history through API, render yourself, send messages via webhook.
Timeline Estimates
Basic integration with chat and push—2–4 days. JWT identification setup, custom UI, and push testing on iOS and Android—up to 1 week.







