<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AssetsLibrary",
  "identifier" : "/documentation/AssetsLibrary/ALAssetsLibraryWriteDataEncodingError",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Assets Library"
    ],
    "preciseIdentifier" : "c:@Ea@ALAssetsLibraryUnknownError@ALAssetsLibraryWriteDataEncodingError"
  },
  "title" : "ALAssetsLibraryWriteDataEncodingError"
}
-->

# ALAssetsLibraryWriteDataEncodingError

The data contained data with the wrong encoding.

```
var ALAssetsLibraryWriteDataEncodingError: Int { get }
```

## Discussion

This error may be returned in the completion block for `ALAssetsLibrary/writeVideoAtPath(toSavedPhotosAlbum:completionBlock:)` and `ALAssetsLibrary/writeImage(toSavedPhotosAlbum:orientation:completionBlock:)` as well as the completion selector for <doc://com.apple.documentation/documentation/UIKit/UIImageWriteToSavedPhotosAlbum(_:_:_:_:)> and <doc://com.apple.documentation/documentation/UIKit/UISaveVideoAtPathToSavedPhotosAlbum(_:_:_:_:)>.

---

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)