Skip to content
Telemetry

iOS SDK

Log product telemetry

Attach structured product events to the active customer without blocking the app on delivery.

Log a product event

BTX.log(...) accepts an event immediately and sends it later. The static facade returns an enqueue disposition, not a network-delivery result.

Product event
BTX.log(
    "checkout_started",
    properties: [
        "cartId": cart.id,
        "itemIds": cart.items.map(.id),
        "totals": [
            "subtotal": cart.subtotal,
            "currency": cart.currency
        ]
    ]
)

The SDK buffers logs until configuration, identity, and runtime transport are ready.

01

Use structured properties

Properties can contain strings, integers, doubles, booleans, nil, arrays, dictionaries keyed by String, or explicit BTXJSONValue values.

  • Use a stable event name such as checkout_started.
  • Prefer product identifiers and bounded values over free-form dumps.
  • Do not include passwords, access tokens, or server credentials.
  • Keep property shapes consistent so events remain comparable.
02

Use automatic runtime context

When logs are enabled, BTX records one canonical app.snapshot event after the runtime starts. It includes privacy-safe app, operating system, device family, architecture, simulator, and SDK version context.

The SDK intentionally excludes advertising identifiers, identifierForVendor, serial numbers, the user-assigned device name, and other stable personal device identifiers.