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.
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.