iOS SDK
iOS API reference
Find the public BTX facade, configuration, customer, messaging, Community, telemetry, feature flag, theme, and push types.
BTX facade
Integrate through the static BTX facade and the public types below.
BTX.configure(_:)creates or replaces the SDK runtime configuration.BTX.identify(_:)binds a customer or clears identity withnil.BTX.log(_:)enqueues structured product telemetry.BTX.messengerpresents messages, feedback, and push actions.BTX.communitypresents the native idea and discussion surface.BTX.helpCenterpresents published articles and opens a specific article by ID.BTX.feedbackPreferencesexposes observable device-local feedback choices.BTX.featureFlagsreads, observes, and refreshes evaluated flags.BTX.inAppCampaignscontrols presentation readiness for campaign cards and banners.
Configuration and identity
Customer messages and feedback
Community
BTX.community.Call BTX.community.present() after enabling .community. Community creates an
anonymous member automatically when the host app has not identified a customer,
and supports ideas, upvotes, comments, replies, and comment likes.
Help Center
Help Center is available in BTXClientKit 3.2.0 or later. Enable .helpCenter
and present its sheet from a host app entry point:
import BTXClientKit
BTX.configure(
BTXConfiguration(
publishableClientKey: "cfk_...",
features: [.helpCenter]
)
)
_ = BTX.helpCenter.present()helpCenterOptions is optional. Its defaults include the title “Help Center,”
full-screen initial sheet height, and the Messenger theme. Use
BTX.helpCenter.view() to embed the view in a host-owned layout,
or BTX.helpCenter.presentArticle(id:) to open a published article by BTX ID.
Presentation calls return BTXHelpCenterPresentationResult; didPresent is
false when the feature is disabled, the SDK is not configured, or a sheet
cannot be presented.
In-app campaigns
See the in-app campaign integration guide for setup, theming, and validation.
Native in-app campaigns require BTXClientKit 3.3.1 or later and campaign access for your project. Check the changelog for release availability.
import BTXClientKit
BTX.configure(
BTXConfiguration(
publishableClientKey: "cfk_...",
features: [.inAppCampaigns]
)
)
BTX.identify(BTXCustomer(externalID: "account-123"))
// After sign-in is confirmed and the host screen is ready:
BTX.inAppCampaigns.setPresentationReady(true)Campaigns show a centered native card or top banner only after the host confirms
sign-in and calls setPresentationReady(true). Presentation defaults to disabled
on each launch and waits two seconds after readiness. Anonymous SDK identities
are ineligible. Repeated readiness calls do not restart the delay. Before sign-out,
call setPresentationReady(false) and BTX.identify(nil) to cancel pending
presentation and dismiss visible campaigns. Account changes reset readiness. The SDK waits for a safe active window without a modal, keyboard,
or another SDK presentation. An internet connection is required. It attempts at
most one automatic campaign per launch or return from the background. Returning
from the background starts a new selection cycle with a two-second delay;
refreshing credentials does not. Tapping a campaign notification opens that
campaign after readiness and eligibility checks.
BTXInAppCampaignOptions(theme:) accepts a BTXTheme; when omitted, in-app
content uses the Messenger theme. Banner body text has a two-line limit. Actions
can open an HTTPS link or a public Help Center article when .helpCenter is enabled.
Images and text appear together after artwork is prepared. Banners use the project logo when no custom artwork is set. If artwork cannot be loaded, the campaign stays hidden and can retry on a later launch or return from the background.
Campaign audiences are fixed when a campaign starts. Each campaign can appear once per customer on an eligible launch or return from the background. Interaction results are saved across restarts. An uncertain presentation is not repeated. See the campaign guide for audience and delivery behavior.
On iOS, BTX.inAppCampaigns.preview(isBanner:title:body:imageURL:) renders sample
content without sending a campaign or recording interactions. Pass true
for a banner or false for a card; an empty imageURL omits artwork. Keep preview
controls in developer-only screens. Preview does not validate identity,
readiness, delivery, or action handling.