---
title: "SCNetworkSetAddService(_:_:)"
framework: systemconfiguration
role: symbol
role_heading: Function
path: "systemconfiguration/scnetworksetaddservice(_:_:)"
---

# SCNetworkSetAddService(_:_:)

Adds the specified network service to the specified set.

## Declaration

```swift
func SCNetworkSetAddService(_ set: SCNetworkSet, _ service: SCNetworkService) -> Bool
```

## Parameters

- `set`: The set (the complete configuration for a single location).
- `service`: The service to add to the set.

## Return Value

Return Value TRUE if the service was added to the set; FALSE if the service was already present or an error occurred.

## Discussion

Discussion Prior to OS X v10.5, the Network Preferences pane did not support having a single service being a member of more than one set. Therefore, an error is returned if you attempt to add a service to more than one set on a pre-10.5 system.

## See Also

### Configuring Network Sets

- [SCNetworkSetContainsInterface(_:_:)](systemconfiguration/scnetworksetcontainsinterface(_:_:).md)
- [SCNetworkSetCopy(_:_:)](systemconfiguration/scnetworksetcopy(_:_:).md)
- [SCNetworkSetCopyAll(_:)](systemconfiguration/scnetworksetcopyall(_:).md)
- [SCNetworkSetCopyCurrent(_:)](systemconfiguration/scnetworksetcopycurrent(_:).md)
- [SCNetworkSetCopyServices(_:)](systemconfiguration/scnetworksetcopyservices(_:).md)
- [SCNetworkSetCreate(_:)](systemconfiguration/scnetworksetcreate(_:).md)
- [SCNetworkSetGetName(_:)](systemconfiguration/scnetworksetgetname(_:).md)
- [SCNetworkSetGetServiceOrder(_:)](systemconfiguration/scnetworksetgetserviceorder(_:).md)
- [SCNetworkSetGetSetID(_:)](systemconfiguration/scnetworksetgetsetid(_:).md)
- [SCNetworkSetGetTypeID()](systemconfiguration/scnetworksetgettypeid().md)
- [SCNetworkSetRemove(_:)](systemconfiguration/scnetworksetremove(_:).md)
- [SCNetworkSetRemoveService(_:_:)](systemconfiguration/scnetworksetremoveservice(_:_:).md)
- [SCNetworkSetSetCurrent(_:)](systemconfiguration/scnetworksetsetcurrent(_:).md)
- [SCNetworkSetSetName(_:_:)](systemconfiguration/scnetworksetsetname(_:_:).md)
- [SCNetworkSetSetServiceOrder(_:_:)](systemconfiguration/scnetworksetsetserviceorder(_:_:).md)
