<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAppleEventManager/removeEventHandler(forEventClass:andEventID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSAppleEventManager(im)removeEventHandlerForEventClass:andEventID:"
  },
  "title" : "removeEventHandler(forEventClass:andEventID:)"
}
-->

# removeEventHandler(forEventClass:andEventID:)

If an Apple event handler has been registered for the event specified by `eventClass` and `eventID`, removes it.

```
func removeEventHandler(forEventClass eventClass: AEEventClass, andEventID eventID: AEEventID)
```

## Discussion

Otherwise does nothing.

---

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)