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

# SCNetworkServiceSetName(_:_:)

Stores the user-specified name for the specified service.

```
func SCNetworkServiceSetName(_ service: SCNetworkService, _ name: CFString?) -> Bool
```

## Parameters

`service`

The network service.

`name`

The user-defined name to associate with the service.

## Return Value

`TRUE` if the name was saved; `FALSE` if an error occurred.

## Discussion

Although it is not technically required, the user-specified names for all services within any given set should be unique. For this reason, an error will be returned if you attempt to name two services with the same string.

---

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)