Instrument
iOS
Capture iOS identity, events, errors, crashes, and backend request context.
The native Teml package supports iOS 15 and later with no runtime dependencies beyond Apple system
frameworks.
Install with Swift Package Manager
In Xcode, choose File → Add Package Dependencies… and add the Teml repository. Or add it to
Package.swift:
dependencies: [
.package(url: "https://github.com/getteml/teml.git", from: "0.1.0"),
],
targets: [
.target(name: "MyApp", dependencies: [.product(name: "Teml", package: "teml")]),
],
During early access, use the version or checkout supplied during onboarding.
Configure once
Call Teml.configure in your SwiftUI App initializer or
application(_:didFinishLaunchingWithOptions:):
import Teml
Teml.configure(
TemlOptions(
apiKey: "tm_...",
environment: "production",
release: "com.acme.Shop@2.4.1+318",
dist: "318"
)
)
Methods called before configuration are no-ops with a warning; SDK failures do not throw into the application.
Use a project-scoped key with ingest:write and analytics:write. Do not include read, management,
or agent scopes in the application.
Connect identity and events
Teml.identify("user_8842", set: ["email": "buyer@acme.example", "plan": "pro"])
Teml.group(type: "company", key: "acme")
Teml.capture("checkout_started", properties: ["cart_size": 3])
Teml.screen("Checkout")
// On logout:
Teml.reset()
Capture errors and crashes
Teml.addBreadcrumb(category: "navigation", message: "opened checkout")
do {
try checkout()
} catch {
Teml.captureError(error)
}
Fatal signals and uncaught exceptions are spooled and delivered on the next launch. Disable handler
installation with enableCrashReporting: false only when another crash SDK must own the process
handlers.
Upload the release build’s dSYM:
teml symbols upload-dsym MyApp.dSYM/Contents/Resources/DWARF/MyApp
Pass the Mach-O file inside the .dSYM bundle, not the bundle directory. Use the artifact from the
archive that produced the installed application.
Propagate to your backend
var request = URLRequest(url: url)
TemlPropagation.apply(to: &request)
This adds W3C trace and customer baggage. Apply it only to trusted application backends. iOS does not swizzle networking, so propagation is explicit.
Verify
Identify a test user, capture an event and caught error, then call Teml.flush. Confirm both appear
under the same customer. For a crash test, relaunch before checking because fatal data is sent on the
next launch.