---
title: willTurnIntoFault()
framework: coredata
role: symbol
role_heading: Instance Method
path: coredata/nsmanagedobject/willturnintofault()
---

# willTurnIntoFault()

Provides an opportunity to add code into the life cycle of the managed object before converting it to a fault.

## Declaration

```swift
func willTurnIntoFault()
```

## Discussion

Discussion This method is the companion of the didTurnIntoFault() method. You can use it to (re)set state which requires access to property values (for example, observers across key paths). The default implementation does nothing.

## See Also

### Managing Change Events

- [contextShouldIgnoreUnmodeledPropertyChanges](coredata/nsmanagedobject/contextshouldignoreunmodeledpropertychanges.md)
- [awakeFromFetch()](coredata/nsmanagedobject/awakefromfetch().md)
- [awakeFromInsert()](coredata/nsmanagedobject/awakefrominsert().md)
- [awake(fromSnapshotEvents:)](coredata/nsmanagedobject/awake(fromsnapshotevents:).md)
- [changedValues()](coredata/nsmanagedobject/changedvalues().md)
- [changedValuesForCurrentEvent()](coredata/nsmanagedobject/changedvaluesforcurrentevent().md)
- [committedValues(forKeys:)](coredata/nsmanagedobject/committedvalues(forkeys:).md)
- [prepareForDeletion()](coredata/nsmanagedobject/preparefordeletion().md)
- [willSave()](coredata/nsmanagedobject/willsave().md)
- [didSave()](coredata/nsmanagedobject/didsave().md)
- [didTurnIntoFault()](coredata/nsmanagedobject/didturnintofault().md)
- [fetchRequest()](coredata/nsmanagedobject/fetchrequest().md)
