addRoom(withName:completionHandler:)
Creates a new room with the specified name.
Declaration
func addRoom(withName roomName: String, completionHandler completion: @escaping @Sendable (HMRoom?, (any Error)?) -> Void)func addRoom(named roomName: String) async throws -> HMRoomParameters
- roomName:
The name of the new room. Must not be
nil, and must not be the name of a room already in the home. - completion:
The block executed after the request is processed.
- room
The newly created room.
- error
nilon success; otherwise, error object indicating the reason for failure.