---
title: "updateName(_:completionHandler:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmservicegroup/updatename(_:completionhandler:)"
---

# updateName(_:completionHandler:)

Updates the name of the service group.

## Declaration

```swift
func updateName(_ name: String, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func updateName(_ name: String) async throws
```

## Parameters

- `name`: The new name; must not be nil.
- `completion`: The block executed after the request is processed.

## See Also

### Managing Service Groups

- [name](homekit/hmservicegroup/name.md)
- [uniqueIdentifier](homekit/hmservicegroup/uniqueidentifier.md)
- [services](homekit/hmservicegroup/services.md)
- [addService(_:completionHandler:)](homekit/hmservicegroup/addservice(_:completionhandler:).md)
- [removeService(_:completionHandler:)](homekit/hmservicegroup/removeservice(_:completionhandler:).md)
