---
title: init
framework: serialdriverkit
role: symbol
role_heading: Instance Method
path: serialdriverkit/iouserserial/init
---

# init

Handles the basic initialization of the service.

## Declaration

```occ
virtual bool init();
```

## Return Value

Return Value YES if initialization is successful, or NO if an error occurred.

## Discussion

Discussion The system calls this method shortly after it instantiates your IOUserSerial subclass, and before it calls the Start method of your service. Override this method and use it to initialize your subclass. Limit the work you do in this method to simple tasks that must occur before your service starts. For example, use this method to allocate memory for your ivars structure. Always call super at the beginning of your implementation of this method.

## See Also

### Configuring the Service

- [Start](serialdriverkit/iouserserial/start.md)
- [Stop](serialdriverkit/iouserserial/stop.md)
- [free](serialdriverkit/iouserserial/free.md)
- [initWith](serialdriverkit/iouserserial/initwith.md)
