---
title: modelDecryption
framework: coreml
role: symbol
role_heading: Type Property
path: coreml/mlmodelerror-swift.struct/modeldecryption
---

# modelDecryption

An error code for problems related to decrypting models.

## Declaration

```swift
static var modelDecryption: MLModelError.Code { get }
```

## Discussion

Discussion Core ML typically throws this error when the framework can’t decrypt a model. The framework can’t decrypt encrypted models in macOS if System Integrity Protection (SIP) is disabled.

## See Also

### Error Codes

- [featureType](coreml/mlmodelerror-swift.struct/featuretype.md)
- [parameters](coreml/mlmodelerror-swift.struct/parameters.md)
- [modelCollection](coreml/mlmodelerror-swift.struct/modelcollection.md)
- [modelDecryptionKeyFetch](coreml/mlmodelerror-swift.struct/modeldecryptionkeyfetch.md)
- [update](coreml/mlmodelerror-swift.struct/update.md)
- [customLayer](coreml/mlmodelerror-swift.struct/customlayer.md)
- [customModel](coreml/mlmodelerror-swift.struct/custommodel.md)
- [io](coreml/mlmodelerror-swift.struct/io.md)
- [predictionCancelled](coreml/mlmodelerror-swift.struct/predictioncancelled.md)
- [generic](coreml/mlmodelerror-swift.struct/generic.md)
- [MLModelError.Code](coreml/mlmodelerror-swift.struct/code.md)
