---
title: "accessory(_:didUpdateNameFor:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmaccessorydelegate/accessory(_:didupdatenamefor:)"
---

# accessory(_:didUpdateNameFor:)

Informs the delegate when the name of a service is updated.

## Declaration

```swift
optional func accessory(_ accessory: HMAccessory, didUpdateNameFor service: HMService)
```

## Parameters

- `accessory`: The accessory with an updated service name.
- `service`: The service whose name changed.

## See Also

### Observing accessories

- [accessoryDidUpdateName(_:)](homekit/hmaccessorydelegate/accessorydidupdatename(_:).md)
- [accessoryDidUpdateReachability(_:)](homekit/hmaccessorydelegate/accessorydidupdatereachability(_:).md)
- [accessoryDidUpdateServices(_:)](homekit/hmaccessorydelegate/accessorydidupdateservices(_:).md)
- [accessory(_:service:didUpdateValueFor:)](homekit/hmaccessorydelegate/accessory(_:service:didupdatevaluefor:).md)
- [accessory(_:didUpdateAssociatedServiceTypeFor:)](homekit/hmaccessorydelegate/accessory(_:didupdateassociatedservicetypefor:).md)
- [accessory(_:didAdd:)](homekit/hmaccessorydelegate/accessory(_:didadd:).md)
- [accessory(_:didRemove:)](homekit/hmaccessorydelegate/accessory(_:didremove:).md)
- [accessory(_:didUpdateFirmwareVersion:)](homekit/hmaccessorydelegate/accessory(_:didupdatefirmwareversion:).md)
