<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 1.1.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ExtensionFoundation",
  "identifier" : "/documentation/ExtensionFoundation/AppExtensionProcess/invalidate()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ExtensionFoundation"
    ],
    "preciseIdentifier" : "s:19ExtensionFoundation03AppA7ProcessV10invalidateyyF"
  },
  "title" : "invalidate()"
}
-->

# invalidate()

Invalidates the host app’s connection to the app extension process.

```
func invalidate()
```

## Discussion

Call this method when you finish communicating with an app extension and no longer need it.
If the current object represents the last connection to the app extension, the system
terminates the app extension’s process. After calling this method, don’t try to communicate
with the app extension using XPC. Instead, remove any references to the app extension and
release this `AppExtensionProcess` type.

---

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)