Skip to content
Configuration

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.

App startup
import BTXClientKit

BTX.configure(
    BTXConfiguration(
        publishableClientKey: "cfk_...",
        features: [.messenger]
    )
)
01

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.

Telemetry only
BTX.configure(
    BTXConfiguration(
        publishableClientKey: "cfk_...",
        features: [.logs]
    )
)
Messenger and Community
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.

02

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.

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