Hi all,
I’m developing a watchOS app and have seen cases where the app is terminated by the system — for example, due to CPU usage limits being exceeded (watchdog termination). Here’s a portion of one of the crash reports:
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: CAROUSEL 2343432205
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[app<app_name>:898] Failed to terminate gracefully after 5.0s
ProcessVisibility: Foreground
ProcessState: Running
WatchdogEvent: process-exit
WatchdogVisibility: Foreground
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 11.280 (user 9.800, system 1.480), 100% CPU",
"Elapsed application CPU time (seconds): 5.162, 46% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>
My questions:
1.) Is there any way to get notified (via Crashlytics, Xcode Organizer, or any other reporting mechanism) when this type of system-level termination happens — similar to how we’re notified of crashes?
2.)Is there any way for a watchOS app to receive runtime warnings from the system when it’s about to exceed CPU or memory limits — similar to UIApplication.didReceiveMemoryWarningNotification on iOS?
Thanks in advance!