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.
Add the Swift package
- 01
Open package dependencies
In Xcode, select File → Add Package Dependencies….
- 02
Enter the package URL
Swift package URL https://github.com/secondcontext/btx-ios-sdk.gitSelect version 3.5.0 or later. Earlier versions contain only the iOS binary. The package URL and
BTXClientKitproduct are shared by iOS and macOS. See the 3.5.0 release notes for the macOS launch and messaging improvements. - 03
Attach the library
Choose the
BTXClientKitproduct and attach it to your macOS application target.Swift import BTXClientKit
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.