iOS SDK
Configure BTX
Configure the SDK once, choose the capabilities your app needs, and attach privacy-safe app context.
Configure once
Call BTX.configure(...) during app startup before identifying a customer or using another BTX capability.
import BTXClientKit
BTX.configure(
BTXConfiguration(
publishableClientKey: "cfk_...",
features: [.messenger]
)
)Choose enabled features
The default configuration enables Customer Messages only. Telemetry and Community are opt-in. Pass an explicit feature set when enabling another capability.
BTX.configure(
BTXConfiguration(
publishableClientKey: "cfk_...",
features: [.logs]
)
)BTX.configure(
BTXConfiguration(
publishableClientKey: "cfk_...",
features: [.messenger, .community],
communityOptions: BTXCommunityOptions(
title: "Acme Community",
welcomeTitle: "Help shape Acme",
welcomeMessage: "Share ideas, support what matters, and hear directly from our team.",
teamDisplayName: "Acme team"
)
)
)Configuration and customer identity are shared across enabled features. You do not need a separate runtime for customer messages, Community, or feature flags.
Attach app context
When .logs is enabled, BTX records privacy-safe runtime context including the host app, bundle identifier, app version and build, iOS version, Apple device family, CPU architecture, simulator state, and SDK version.
Use BTXAppContext when you want to provide explicit version fields or app-specific, low-cardinality attributes.
BTX.configure(
BTXConfiguration(
publishableClientKey: "cfk_...",
appContext: BTXAppContext(
appVersion: Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String,
buildNumber: Bundle.main.infoDictionary?["CFBundleVersion"] as? String
),
features: [.logs, .messenger]
)
)- Keep attribute names stable between releases.
- Do not send credentials or personal device identifiers.
- Identify the signed-in customer after configuration completes.