[!NOTE] Branch layout (August 2026)
The best open-source crash reporting framework for Apple platforms. Supports iOS, macOS, tvOS, watchOS, and visionOS.
KSCrash catches Mach exceptions, signals, C++/ObjC exceptions, main thread hangs, and OS-level terminations (OOM, thermal, CPU, reboot). It generates full Apple-format crash reports with every field filled in.
If you are upgrading from 2.5.x, see the migration guide. For upgrades from 1.x, see the 1.x to 2.0 migration guide.
SPM: Add https://github.com/kstenerud/KSCrash.git in Xcode (File > Add Packages), or in
Package.swift:
dependencies: [
.package(url: "https://github.com/kstenerud/KSCrash.git", .upToNextMajor(from: "2.6.0"))
]
CocoaPods:
pod 'KSCrash', '~> 2.6'
import KSCrashRecording // KSCrash for CocoaPods
let config = KSCrashConfiguration()
try KSCrash.shared.install(with: config)
That's it. KSCrash will catch crashes and store reports on disk. To send reports to a server, use an
installation. See KSCrashInstallation.h for details.
See the Architecture and Code Tour wiki pages for how these work under the hood.
The Watchdog monitor detects main thread hangs (250ms+) and captures full backtraces. Enable with
.watchdog in your monitor config. See KSCrash+Hang.h for real-time hang observation.
Detects OS-level terminations (OOM, thermal, CPU, reboot) by comparing previous-run state at launch.
Query the result with KSCrash.shared.previousTerminationReason.
Tracks CPU usage with sliding-window averages mirroring Apple's enforcement thresholds. Optionally
generates non-fatal reports on warning/critical transitions via enableCPUExceptionReporting.
Store per-key data that persists across crashes via KSCrash+UserInfo.h. Uses an mmap'd key-value
store with zero crash-time overhead.
KSCrashProfiler module)KSCrashMonitors module)KSCrashReportModel module)AppMemoryTrackerreportUserExceptionFor configuration options, see KSCrashConfiguration.h. For the full API, see KSCrash.h.
| Deprecated | Replacement |
|---|---|
userInfo property | Per-key API in KSCrash+UserInfo.h |
deadlockWatchdogInterval | KSCrashMonitorTypeWatchdog |
enableSigTermMonitoring | Removed (always caught) |
KSCrashMonitorTypeMainThreadDeadlock | KSCrashMonitorTypeWatchdog |
KSCrashMonitorTypeMemoryTermination | KSCrashMonitorTypeTermination |
KSCrashAppStateTrackerObserving | addObserverWithBlock: |
crashNotifyCallback / reportWrittenCallback | isWritingReportCallback / didWriteReportCallback |
See the migration guide for details and rationale.
MIT License. See LICENSE for details.
This project is tested with BrowserStack.
Objective-C
45.8%
C
33.6%
Swift
14.2%
C++
1.9%
Assembly
1.6%
Python
1.2%
[!NOTE] Branch layout (August 2026)
The best open-source crash reporting framework for Apple platforms. Supports iOS, macOS, tvOS, watchOS, and visionOS.
KSCrash catches Mach exceptions, signals, C++/ObjC exceptions, main thread hangs, and OS-level terminations (OOM, thermal, CPU, reboot). It generates full Apple-format crash reports with every field filled in.
If you are upgrading from 2.5.x, see the migration guide. For upgrades from 1.x, see the 1.x to 2.0 migration guide.
SPM: Add https://github.com/kstenerud/KSCrash.git in Xcode (File > Add Packages), or in
Package.swift:
dependencies: [
.package(url: "https://github.com/kstenerud/KSCrash.git", .upToNextMajor(from: "2.6.0"))
]
CocoaPods:
pod 'KSCrash', '~> 2.6'
import KSCrashRecording // KSCrash for CocoaPods
let config = KSCrashConfiguration()
try KSCrash.shared.install(with: config)
That's it. KSCrash will catch crashes and store reports on disk. To send reports to a server, use an
installation. See KSCrashInstallation.h for details.
See the Architecture and Code Tour wiki pages for how these work under the hood.
The Watchdog monitor detects main thread hangs (250ms+) and captures full backtraces. Enable with
.watchdog in your monitor config. See KSCrash+Hang.h for real-time hang observation.
Detects OS-level terminations (OOM, thermal, CPU, reboot) by comparing previous-run state at launch.
Query the result with KSCrash.shared.previousTerminationReason.
Tracks CPU usage with sliding-window averages mirroring Apple's enforcement thresholds. Optionally
generates non-fatal reports on warning/critical transitions via enableCPUExceptionReporting.
Store per-key data that persists across crashes via KSCrash+UserInfo.h. Uses an mmap'd key-value
store with zero crash-time overhead.
KSCrashProfiler module)KSCrashMonitors module)KSCrashReportModel module)AppMemoryTrackerreportUserExceptionFor configuration options, see KSCrashConfiguration.h. For the full API, see KSCrash.h.
| Deprecated | Replacement |
|---|---|
userInfo property | Per-key API in KSCrash+UserInfo.h |
deadlockWatchdogInterval | KSCrashMonitorTypeWatchdog |
enableSigTermMonitoring | Removed (always caught) |
KSCrashMonitorTypeMainThreadDeadlock | KSCrashMonitorTypeWatchdog |
KSCrashMonitorTypeMemoryTermination | KSCrashMonitorTypeTermination |
KSCrashAppStateTrackerObserving | addObserverWithBlock: |
crashNotifyCallback / reportWrittenCallback | isWritingReportCallback / didWriteReportCallback |
See the migration guide for details and rationale.
MIT License. See LICENSE for details.
This project is tested with BrowserStack.
(top 30 of 67)
Objective-C
45.8%
C
33.6%
Swift
14.2%
C++
1.9%
Assembly
1.6%
Python
1.2%