Skip to content
Installation

Prepare a macOS integration

Check macOS requirements, package availability, and your app’s publishable client key.

Prepare the host app

  • A native SwiftUI or AppKit app targeting macOS 13 or later.
  • Xcode with Swift 5.10 or later.
  • A BTX client registered with the macOS platform and the app's exact bundle ID.
  • A stable customer ID available after sign-in.

Follow Create a publishable key to register the client. Use a separate client and key for each app variant with a different bundle ID, including any separate iOS app.

01

Add the Swift package

  1. 01

    Open package dependencies

    In Xcode, select File → Add Package Dependencies….

  2. 02

    Enter the package URL

    Swift package URL
    https://github.com/secondcontext/btx-ios-sdk.git

    Select version 3.5.0 or later. Earlier versions contain only the iOS binary. The package URL and BTXClientKit product are shared by iOS and macOS. See the 3.5.0 release notes for the macOS launch and messaging improvements.

  3. 03

    Attach the library

    Choose the BTXClientKit product and attach it to your macOS application target.

    Swift
    import BTXClientKit
02

Configure your integration

Configure BTX and register a host window before presenting support or feedback. APNs is optional; see Push notifications for signing and credential requirements.