iOS SDK
Open customer messages
Give customers a native place to start conversations, review replies, and share context with your team.
Enable customer messages
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()The messenger opens the customer’s conversation history and lets them start a new thread. Foreground updates work without push notification setup.
Open a contextual conversation
When the customer asks for help from a specific product surface, pass a launch context. This gives your team the source of the request without making the customer repeat it.
BTX.messenger.present(
route: .compose(
launchContext: BTXLaunchContext(
conversationPurpose: .support,
entryPoint: "order_detail",
sourceType: "order",
sourceID: order.id,
threadTitle: "Order Support"
)
)
)- 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 conversation 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.