<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "visionOS: 1.0.0 - 1.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLModelCollection/didChangeNotification",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Core ML",
      "CoreML"
    ],
    "preciseIdentifier" : "c:@MLModelCollectionDidChangeNotification"
  },
  "title" : "didChangeNotification"
}
-->

# didChangeNotification

The notification the framework sends when it receives an update to a model collection.

```
class let didChangeNotification: NSNotification.Name
```

## Discussion

Register your app to get notifications when a model collection update is available by calling <doc://com.apple.documentation/documentation/Foundation/NotificationCenter/addObserver(forName:object:queue:using:)>.

```swift
let center = NotificationCenter.default
var token: NSObjectProtocol?

token = center.addObserver(forName: MLModelCollection.didChangeNotification,
                           object: nil,
                           queue: nil) { [unowned self] note in
    guard let modelCollection = note.object as? MLModelCollection else {
        print("Model Collection notification's object is not a model collection")
        return
    }

    // Use updated model collection ...
    self.receivedUpdatedModelCollection(modelCollection)

    // Clean up notification registration.
    center.removeObserver(token!)
}
```

Typically, you register for model collection notifications when your app needs to use the newest models as soon as the collection is available. Your app can always get the newest model collection by calling [`beginAccessingModelCollectionWithIdentifier:completionHandler:`](/documentation/CoreML/MLModelCollection/beginAccessingModelCollectionWithIdentifier:completionHandler:).

---

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)