<!--
{
  "availability" : [
    "macOS: 10.9.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/xpc_activity_unregister(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "c:@F@xpc_activity_unregister"
  },
  "title" : "xpc_activity_unregister(_:)"
}
-->

# xpc_activity_unregister(_:)

Unregisters an activity with the specified identifier.

```
func xpc_activity_unregister(_ identifier: UnsafePointer<CChar>)
```

## Parameters

`identifier`

The identifier of the activity to unregister.

## Discussion

A dynamically registered activity will be deleted in response to this call. Statically registered activity (from a launchd property list) will be reverted to its original criteria if any modifications were made.

Unregistering an activity has no effect on any outstanding [`xpc_activity_t`](/documentation/XPC/xpc_activity_t) objects or any currently executing [`xpc_activity_handler_t`](/documentation/XPC/xpc_activity_handler_t) blocks; however, no new handler block invocations will be made after it is unregistered.

---

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)