<!--
{
  "availability" : [
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WatchKit",
  "identifier" : "/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "WatchKit"
    ],
    "preciseIdentifier" : "c:@E@WKExtendedRuntimeSessionErrorCode"
  },
  "title" : "WKExtendedRuntimeSessionErrorCode"
}
-->

# WKExtendedRuntimeSessionErrorCode

The error codes reported by extended runtime sessions.

```
enum WKExtendedRuntimeSessionErrorCode
```

## Overview

The session passes these errors to the sesson delegate’s [`extendedRuntimeSession(_:didInvalidateWith:error:)`](/documentation/WatchKit/WKExtendedRuntimeSessionDelegate/extendedRuntimeSession(_:didInvalidateWith:error:)) method.

## Topics

### Error Codes

[`case unknown`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/unknown)

An unknown error occurred.

[`case scheduledTooFarInAdvance`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/scheduledTooFarInAdvance)

The app attempted to schedule a session too far in the future.

[`case mustBeActiveToStartOrSchedule`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/mustBeActiveToStartOrSchedule)

The watchOS app attempted to start or schedule a session while not in an active state.

[`case notYetStarted`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/notYetStarted)

The app invalidated the session before it started.

[`case exceededResourceLimits`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/exceededResourceLimits)

The session exceeded its resource limits.

[`case barDisabled`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/barDisabled)

The user has disabled background app refresh.

[`case notApprovedToStartSession`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/notApprovedToStartSession)

The app attempted to start a session, but doesn’t have a valid session type.

[`case notApprovedToSchedule`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/notApprovedToSchedule)

The app attempted to schedule a session, but the session type does not support scheduling.

### Enumeration Cases

[`case mustBeActiveToPrompt`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/mustBeActiveToPrompt)

[`case unsupportedSessionType`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/unsupportedSessionType)

### Initializers

[`init?(rawValue: Int)`](/documentation/WatchKit/WKExtendedRuntimeSessionErrorCode/init(rawValue:))

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)