---
title: "observeValue(forKeyPath:of:change:context:)"
framework: coredata
role: symbol
role_heading: Instance Method
path: "coredata/nsmanagedobjectcontext/observevalue(forkeypath:of:change:context:)"
---

# observeValue(forKeyPath:of:change:context:)

Allows a context that has registered as an observer of a value to be notified of a change to that value.

## Declaration

```swift
func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [String : Any]?, context: UnsafeMutableRawPointer?)
```

## See Also

### Handling managed objects

- [shouldDeleteInaccessibleFaults](coredata/nsmanagedobjectcontext/shoulddeleteinaccessiblefaults.md)
- [insertedObjects](coredata/nsmanagedobjectcontext/insertedobjects.md)
- [updatedObjects](coredata/nsmanagedobjectcontext/updatedobjects.md)
- [deletedObjects](coredata/nsmanagedobjectcontext/deletedobjects.md)
- [shouldHandleInaccessibleFault(_:for:triggeredByProperty:)](coredata/nsmanagedobjectcontext/shouldhandleinaccessiblefault(_:for:triggeredbyproperty:).md)
- [insert(_:)](coredata/nsmanagedobjectcontext/insert(_:).md)
- [delete(_:)](coredata/nsmanagedobjectcontext/delete(_:).md)
- [assign(_:to:)](coredata/nsmanagedobjectcontext/assign(_:to:).md)
- [obtainPermanentIDs(for:)](coredata/nsmanagedobjectcontext/obtainpermanentids(for:).md)
- [detectConflicts(for:)](coredata/nsmanagedobjectcontext/detectconflicts(for:).md)
- [refresh(_:mergeChanges:)](coredata/nsmanagedobjectcontext/refresh(_:mergechanges:).md)
- [processPendingChanges()](coredata/nsmanagedobjectcontext/processpendingchanges().md)
