<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextView/registerForServices()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextView(cm)registerForServices"
  },
  "title" : "registerForServices()"
}
-->

# registerForServices()

Registers send and return types for the Services facility.

```
class func registerForServices()
```

## Discussion

This method is invoked automatically when the first instance of a text view is created; you should never need to invoke it directly.

Subclasses of  `NSTextView` that wish to add support for new service types should override [`registerForServices()`](/documentation/AppKit/NSTextView/registerForServices()) to call `super` and then register their own new types.

---

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)