Swift Package Manager
// Package.swift
.package(url: "https://github.com/scriptx-com/traceitx-releases", from: "0.7.0")
// Then, on your app target:
.product(name: "TraceItX", package: "traceitx-releases"),
.product(name: "TraceItXReporterUI", package: "traceitx-releases"),
from: is a floor, not a pin — it resolves the newest release in the range, so
this line does not need editing when we ship.
Or in Xcode: File → Add Package Dependencies, paste the URL, and add
both products to your app target. TraceItX is the SDK; TraceItXReporterUI
is the reporter modal. Without the second, report.open() has nothing to open.
CocoaPods
pod 'TraceItX' # the SDK (the Core subspec)
pod 'TraceItX/ReporterUI' # the reporter modal
Start it
Once, as early as you can — application(_:didFinishLaunchingWithOptions:), or
your App initialiser:
import TraceItXKit
import TraceItXReporterUI
TXReporterPresenter.installResolver()
try TraceItX.shared.start(config: TraceItXConfig(appId: "txx_live_…"))
The module is TraceItXKit, even though the package product is TraceItX.
appId is your SDK key — there is no separate apiKey parameter. start
throws TraceItXConfigError.missingAppId when the key is blank, does not start
with txx_live_, or is the wrong length, so a bad key surfaces in development
instead of producing an app that silently never reports.
installResolver() wires the reporter to report.open(). Call it once at
launch; without it open() throws.
Open the reporter
Opening is on the report API, and it is async throws — it returns when the
user submits or cancels:
Task {
let result = try await TraceItX.shared.report.open()
}
result is .submitted, .queued (stored offline, sent on a later launch) or
.cancelled. Wire it to your own button, a debug menu, or a gesture you own —
the SDK installs no trigger of its own.
On tvOS there is no on-screen reporter: installResolver() does not exist
there and open() throws. Reports are filed from a paired phone or the
dashboard instead.
Requirements
| iOS / iPadOS | 15+ |
| tvOS | 15+ |
| Swift | Package manifest is swift-tools-version: 5.10 |
| Distribution | Binary framework — the source repo stays private |
Verify it
File a report and check the delivery log in the dashboard. If nothing arrives,
check captureGate, which reports whether capture is armed at all — start()
opens it, kill() closes it:
print(TraceItX.shared.captureGate) // Bool
print(TraceItX.shared.currentConfig) // TraceItXConfig?
The usual causes are a wrong appId, and calling start from a code path that
does not run on every launch.
Next
- Configuration — every option
- Screen tracking — UIKit is automatic, SwiftUI is not
- Sensitive content — mask before capture