We’re receiving increasing user reports that our macOS app is unexpectedly terminated in the background—without crash reports or user action.
Our app is a sandboxed status-bar app (UIElement, NSStatusItem) running continuously, syncing data via CloudKit and Core Data. It has no main window unless opened via the status bar.
Observed patterns:
- Happens more frequent on macOS 15 (Sonoma), though earlier versions are affected too.
- Often occurs when disk space is limited (~10% free), but occasionally happens with ample free space.
- System logs consistently show:
CacheDeleteAppContainerCaches requesting termination assertion for <our bundle ID>
No crash reports are generated, indicating macOS silently terminates our app, likely related to RunningBoard or CacheDelete purging caches during disk pressure. Since our app is meant to run persistently, these silent terminations significantly disrupt user experience.
We’re seeking guidance on:
- Can we prevent or reduce these terminations for persistently running status bar apps?
- Are there recommended APIs or configurations (e.g., NSProcessInfo assertions, entitlements, LaunchAgents) to resist termination or receive notifications under low disk conditions?
- What are Apple’s best practices for ensuring sandboxed apps reliably run during disk pressure?
We understand macOS terminates apps to reclaim space but would appreciate recommendations to improve resilience within platform guidelines.
Thank you!