<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSManagedObject/willTurnIntoFault()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSManagedObject(im)willTurnIntoFault"
  },
  "title" : "willTurnIntoFault()"
}
-->

# willTurnIntoFault()

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

```
func willTurnIntoFault()
```

## Discussion

This method is the companion of the [`didTurnIntoFault()`](/documentation/CoreData/NSManagedObject/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.

---

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)