---
title: "init(forEvents:progressHandler:completionHandler:)"
framework: coreml
role: symbol
role_heading: Initializer
path: "coreml/mlupdateprogresshandlers/init(forevents:progresshandler:completionhandler:)"
---

# init(forEvents:progressHandler:completionHandler:)

Creates the collection of closures an update task uses to notify your app of its progress.

## Declaration

```swift
init(forEvents interestedEvents: MLUpdateProgressEvent, progressHandler: ((MLUpdateContext) -> Void)?, completionHandler: @escaping (MLUpdateContext) -> Void)
```

## Parameters

- `interestedEvents`: The events for which the update task will call your closures for, contained in an option set.
- `progressHandler`: The closure an update task uses to notify your app. The update task only uses this closure for the events you specified in interestedEvents.
- `completionHandler`: The closure that an update tasks uses to notify you when it is complete.

## See Also

### Creating progress handlers

- [MLUpdateProgressEvent](coreml/mlupdateprogressevent.md)
- [MLUpdateContext](coreml/mlupdatecontext.md)
