---
title: name
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/netservice/name
---

# name

A string containing the name of this service.

## Declaration

```swift
var name: String { get }
```

## Discussion

Discussion This value is set when the object is first initialized, whether by your code or by a browser object. See init(domain:type:name:) for more information. note: This became a property in OS X v10.9 and iOS 7, but the underlying getter method (name) has been available since this class was first introduced.

## See Also

### Configuring Network Services

- [data(fromTXTRecord:)](foundation/netservice/data(fromtxtrecord:).md)
- [dictionary(fromTXTRecord:)](foundation/netservice/dictionary(fromtxtrecord:).md)
- [addresses](foundation/netservice/addresses.md)
- [domain](foundation/netservice/domain.md)
- [includesPeerToPeer](foundation/netservice/includespeertopeer.md)
- [getInputStream(_:outputStream:)](foundation/netservice/getinputstream(_:outputstream:).md)
- [type](foundation/netservice/type.md)
- [txtRecordData()](foundation/netservice/txtrecorddata().md)
- [setTXTRecord(_:)](foundation/netservice/settxtrecord(_:).md)
- [delegate](foundation/netservice/delegate.md)
