iOS SDK
Customer Messenger
Give customers a native place to ask for help and keep support threads going with your team.
Enable Customer Messenger
Include .messenger when configuring BTX. The SDK prepares messaging after configuration and customer identification are both available.
BTX.configure(
BTXConfiguration(
publishableClientKey: "cfk_...",
features: [.messenger]
)
)Present from your interface
Connect a Help, Support, or Messages control in your app to the public messenger facade.
BTX.messenger.present()Customer Messenger opens the customer’s thread history and lets them start a new thread. Foreground updates work without push notification setup.
Unread replies can show an in-app banner when the app opens or returns to the foreground. Dismissing a reply or opening its thread stops that reply's banner from returning on the same device, including after app restart. A new reply can show a new banner. Dismissing the banner leaves the thread unread.
Open a contextual thread
When pairing or reconnection fails, pass the affected device and its current state. Replace the sample Mithril Wearables values with state from your connection manager. Use the same device ID as your telemetry events.
BTX.messenger.present(
route: .compose(
launchContext: BTXLaunchContext(
conversationPurpose: .support,
entryPoint: "device_connection_error",
sourceType: "device",
sourceID: "ring_123",
threadTitle: "Mithril One connection",
threadIntro: .card(
kind: "device",
title: "Mithril One",
subtitle: "Connection issue",
rows: [
BTXThreadIntroRow(label: "Firmware", value: "2.3.7"),
BTXThreadIntroRow(label: "Battery", value: "42%"),
BTXThreadIntroRow(label: "Connection", value: "Disconnected")
]
),
threadAttributes: [
"device": [
"id": .string("ring_123"),
"model": .string("Mithril One"),
"firmwareVersion": .string("2.3.7")
]
]
)
)
)- Use a stable entry point name that describes the product surface.
- Include source IDs only when they are safe and useful to your support team.
- Keep thread titles short enough to scan in the customer and operator interfaces.
Set expectations while your team is responding
In BTXClientKit 3.2.1 and later, when the delayed response message is enabled in BTX project settings, the SDK shows your configured note if the customer’s latest message remains unanswered for the configured delay. An operator reply cancels or removes the note automatically.
The note is local to the messenger and is not added to the thread history. The enabled state, copy, and delay come from BTX, so the host app does not need extra configuration.
Attachments and notifications
The native composer negotiates supported image and video attachments with BTX before enabling media controls. It uses the system photo picker and does not require full photo-library permission.
Push notifications are optional. Add APNs forwarding later if customers should receive replies while the app is not active; messaging and foreground updates work without it.