Skip to content
Quickstart

Get started

Quickstart

Install BTXClientKit, enable the features you need, and identify a customer only when the experience requires it.

Before you start

You need an iOS 17 or newer app and a BTX publishable client key. A publishable key is designed for the client application; never place server credentials in the app bundle.

01

Integrate BTX

  1. 01

    Add the package

    In Xcode, choose File → Add Package Dependencies…, enter https://github.com/secondcontext/btx-ios-sdk.git, and add the BTXClientKit product to your app target.

  2. 02

    Configure once

    Call BTX.configure(...) during app startup. Enable only the capabilities your app is ready to use.

    App startup
    import BTXClientKit
    
    BTX.configure(
        BTXConfiguration(
            publishableClientKey: "cfk_...",
            features: [.messenger, .community]
        )
    )
  3. 03

    Identify the signed-in customer

    Use the stable identifier your own product already trusts.

    Authenticated session
    BTX.identify(
        BTXCustomer(
            externalID: currentUser.id,
            name: currentUser.name,
            email: currentUser.email
        )
    )
  4. 04

    Present customer messages

    Connect your own Help, Support, or Messages button to the messenger facade.

    Button action
    BTX.messenger.present()
  5. 05

    Open Community

    Connect your app's Community entry point to the Community facade. Customize the title, welcome copy, team name, and theme with BTXCommunityOptions when the defaults do not fit your product.

    Community button action
    BTX.community.present()
02

Verify the integration

Run the app, sign in with a test customer, and open each enabled surface. The customer should be able to create a conversation and, when Community is enabled, browse or post an idea.