<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/XPC_ACTIVITY_STATE_WAIT",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "c:@Ea@XPC_ACTIVITY_STATE_CHECK_IN@XPC_ACTIVITY_STATE_WAIT"
  },
  "title" : "XPC_ACTIVITY_STATE_WAIT"
}
-->

# XPC_ACTIVITY_STATE_WAIT

The activity is waiting for an opportunity to run.

```
var XPC_ACTIVITY_STATE_WAIT: Int { get }
```

## Discussion

This value never returns within the activity’s handler block because the block’s invocation is in response to [`XPC_ACTIVITY_STATE_CHECK_IN`](/documentation/XPC/XPC_ACTIVITY_STATE_CHECK_IN) or [`XPC_ACTIVITY_STATE_RUN`](/documentation/XPC/XPC_ACTIVITY_STATE_RUN).

A launchd job may idle exit while an activity is in the wait state and relaunch in response to the activity becoming runnable. The launchd job simply needs to reregister for the activity on its next launch by passing [`XPC_ACTIVITY_STATE_CHECK_IN`](/documentation/XPC/XPC_ACTIVITY_STATE_CHECK_IN) to [`xpc_activity_register(_:_:_:)`](/documentation/XPC/xpc_activity_register(_:_:_:)).

---

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)