<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLUpdateProgressHandlers/init(forEvents:progressHandler:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core ML"
    ],
    "preciseIdentifier" : "c:objc(cs)MLUpdateProgressHandlers(im)initForEvents:progressHandler:completionHandler:"
  },
  "title" : "init(forEvents:progressHandler:completionHandler:)"
}
-->

# init(forEvents:progressHandler:completionHandler:)

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

```
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.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)