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

# NSRegisterServicesProvider(_:_:)

Registers a service provider.

```
func NSRegisterServicesProvider(_ provider: Any?, _ name: NSServiceProviderName)
```

## Parameters

`provider`

The object providing the service you want to register.

`name`

The unique name to associate with the service. This string is used to advertise the service to interested clients.

## Discussion

Use this function to register custom services not directly related to your application.

You should not use this function to register the services provided by your application. For your application’s services, you should use the [`servicesProvider`](/documentation/AppKit/NSApplication/servicesProvider) method of [`NSApplication`](/documentation/AppKit/NSApplication), passing a non-`nil` argument.

---

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)