---
title: defaultValue
framework: coredata
role: symbol
role_heading: Instance Property
path: coredata/nsattributedescription/defaultvalue
---

# defaultValue

The default value of the attribute.

## Declaration

```swift
var defaultValue: Any? { get set }
```

## Discussion

Discussion Default values are retained by a managed object model, not copied. This means that attribute values do not have to implement the NSCopying protocol, however it also means that you should not modify any objects after they have been set as default values. Special Considerations Setting the default value raises an exception if the receiver’s model has been used by an object graph manager.

## See Also

### Configuring the behavior

- [allowsCloudEncryption](coredata/nsattributedescription/allowscloudencryption.md)
- [allowsExternalBinaryDataStorage](coredata/nsattributedescription/allowsexternalbinarydatastorage.md)
- [preservesValueInHistoryOnDeletion](coredata/nsattributedescription/preservesvalueinhistoryondeletion.md)
- [valueTransformerName](coredata/nsattributedescription/valuetransformername.md)
