<!--
{
  "availability" : [
    "iOS: 14.0.0 - 27.0.0",
    "iPadOS: 14.0.0 - 27.0.0",
    "macCatalyst: 14.0.0 - 27.0.0",
    "macOS: 11.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "MetricKit",
  "identifier" : "/documentation/MetricKit/MXForegroundExitData",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MetricKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MXForegroundExitData"
  },
  "title" : "MXForegroundExitData"
}
-->

# MXForegroundExitData

An object representing counts for the different types of foreground app exits.

```
class MXForegroundExitData
```

## Topics

### Reading the Normal Exit Count

[`cumulativeNormalAppExitCount`](/documentation/MetricKit/MXForegroundExitData/cumulativeNormalAppExitCount)

The number of times the app exited normally from the foreground.

### Reading the Abnormal Exit Count

[`cumulativeAbnormalExitCount`](/documentation/MetricKit/MXForegroundExitData/cumulativeAbnormalExitCount)

The number of times the app exited abnormally from the foreground.

### Reading the System Termination Count

[`cumulativeAppWatchdogExitCount`](/documentation/MetricKit/MXForegroundExitData/cumulativeAppWatchdogExitCount)

The number of times the system watchdog terminated the app from the foreground.

[`cumulativeMemoryResourceLimitExitCount`](/documentation/MetricKit/MXForegroundExitData/cumulativeMemoryResourceLimitExitCount)

The number of times the system terminated the app from the foreground for using too much memory.

### Reading the Crash Count

[`cumulativeBadAccessExitCount`](/documentation/MetricKit/MXForegroundExitData/cumulativeBadAccessExitCount)

The number of times the system terminated the app from the foreground for attempting an invalid memory access.

[`cumulativeIllegalInstructionExitCount`](/documentation/MetricKit/MXForegroundExitData/cumulativeIllegalInstructionExitCount)

The number of times the system terminated the app from the foreground for attempting to execute an illegal or undefined instruction.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)