<!--
{
  "availability" : [
    "macOS: 10.8.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSharingService/init(named:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSharingService(cm)sharingServiceNamed:"
  },
  "title" : "init(named:)"
}
-->

# init(named:)

Returns a sharing service instance representing the specified service name.

```
init?(named serviceName: NSSharingService.Name)
```

## Parameters

`serviceName`

The service name. The possible system provided values are listed in `Available Sharing Services`.

## Return Value

An instance of `NSSharingService` for the specified service name.

## See Also

[`sharingServices(forItems:)`](/documentation/AppKit/NSSharingService/sharingServices(forItems:))

Returns a list of sharing services which could share all the provided items together.

[`canPerform(withItems:)`](/documentation/AppKit/NSSharingService/canPerform(withItems:))

Returns whether the service can share all the specified items.



---

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)