Integrating Freshdesk SDK for Mobile App Support
Freshdesk SDK (Freshchat)—the choice when you need a ticketing system with chat without Zendesk or Intercom's enterprise pricing. The SDK is mature, but documentation sometimes lags behind current versions, creating non-standard integration difficulties.
Installation
iOS
# Podfile
pod 'FreshchatSDK'
Freshchat SDK is heavy: adds 8–12 MB to binary size. For apps where size matters, account for this before integrating.
Android
// build.gradle.kts
implementation("com.freshchat.consumer.sdk:freshchat-android:5.x.x")
Requires minimum minSdk = 21—if lower in project, need upgrade or conditional loading.
Initialization
// iOS: AppDelegate
import FreshchatSDK
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let config = FreshchatConfig(
appID: "YOUR_APP_ID",
andAppKey: "YOUR_APP_KEY"
)
config.teamMemberInfoVisible = true
config.showNotificationBanner = true
Freshchat.sharedInstance().initWith(config)
return true
}
// Android: Application.onCreate()
val config = FreshchatConfig("YOUR_APP_ID", "YOUR_APP_KEY")
config.isTeamMemberInfoVisible = true
Freshchat.init(this, config)
Identification and Custom Properties
// iOS: set user data
let user = FreshchatUser.sharedInstance()
user.firstName = "John"
user.lastName = "Doe"
user.email = "[email protected]"
user.externalID = "user_id_12345"
Freshchat.sharedInstance().setUser(user)
// Custom properties for agent
Freshchat.sharedInstance().setUserPropertyforKey("subscription_plan", withValue: "premium")
Important: custom properties are passed to the agent—visible in Freshdesk panel when viewing chat. Don't transmit sensitive data even masked.
Opening Interface
// Specific support channel
Freshchat.sharedInstance().showConversations(self, with: nil)
// FAQ section
Freshchat.sharedInstance().showFAQs(self, with: nil)
Freshchat allows limiting shown FAQs by tags—useful if FAQ written in multiple languages or for different user segments:
let options = FreshchatOptions()
options.tags = ["premium", "ios"]
Freshchat.sharedInstance().showFAQs(self, with: options)
Push Notifications
// iOS: pass APNs token
func application(_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Freshchat.sharedInstance().setPushRegistrationToken(deviceToken)
}
// Handle push
func application(_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable: Any]) {
if Freshchat.sharedInstance().isFreshchatNotification(userInfo) {
Freshchat.sharedInstance().handleRemoteNotification(userInfo, andAppState: application.applicationState)
}
}
Freshchat uses own push channel via APNs. p8 key or p12 certificate uploaded to Freshdesk Admin → Mobile App.
Typical Issues
Theme conflict on Android. Freshchat pulls its own FreshchatTheme and overrides ActionBar colors. With custom app theme—after opening Freshchat, toolbar colors reset. Solution: inherit Freshchat theme from your base theme via FreshchatTheme override in styles.xml.
Localization. SDK supports several languages out of box, but custom UI string localization (e.g., branded "Write to us" instead of "Start a conversation")—requires string overrides with same keys via Localizable.strings (iOS) or strings.xml (Android).
Restore ID. After uninstalling and reinstalling, chat history disappears without Restore ID mechanism. Freshchat generates ID on first init—save to backend, restore on next session.
Timeline Estimates
Basic chat and push integration—2–4 days. Full integration with Restore ID, custom theme, tag-filtered FAQ, and multilanguage support—up to 1 week.







