Error Capture
Swift does not expose a global hook for every thrown Error, and Apple platform crash capture has sharp edges. The Swift SDK keeps automatic capture opt-in and uses Apple-native diagnostics where possible.
Recommended setup
Section titled “Recommended setup”try Auralog.initialize( apiKey: "aura_your_api_key", environment: "production", captureMetricKit: true, captureUnhandledExceptions: true)MetricKit
Section titled “MetricKit”captureMetricKit: true subscribes to MetricKit and forwards available metric and diagnostic payloads. In this beta, MetricKit forwarding is implemented for iOS and no-ops on other platforms.
MetricKit can include crash, hang, CPU, disk-write, launch, memory, and performance diagnostics depending on platform and OS availability.
Objective-C exceptions
Section titled “Objective-C exceptions”captureUnhandledExceptions: true installs NSSetUncaughtExceptionHandler and emits a fatal log when an uncaught Objective-C exception reaches the handler.
This does not capture every Swift failure. Swift thrown errors, fatalError, memory access crashes, watchdog terminations, and low-level signals are not equivalent to Objective-C exceptions.
Swift error boundaries
Section titled “Swift error boundaries”Use Auralog.run or Auralog.task at async boundaries to avoid writing manual capture calls everywhere:
.task { try? await Auralog.run(metadata: ["screen": "home"]) { try await viewModel.refresh() }}
Button("Sync") { _ = Auralog.task(metadata: ["action": "manual_sync"]) { try await syncNow() }}Manual capture
Section titled “Manual capture”When you have useful local context, direct capture is still the clearest option:
do { try await checkout()} catch { Auralog.capture(error, metadata: ["screen": "checkout"]) throw error}Beta limitations
Section titled “Beta limitations”The Swift SDK is not a full Crashlytics or Sentry replacement in this beta. Signal-level crash reporting, dSYM upload, symbolication, grouping, and release health dashboards are out of scope.