<!--
{
  "documentType" : "article",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/PhotoKit/deprecated-errors",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Deprecated Errors"
}
-->

# Deprecated Errors

Review unsupported errors and their replacements.

## Topics

### Error Codes

[`static var invalid: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/invalid)

The requested operation is invalid.

[`var PHPhotosErrorInvalid: Int`](/documentation/Photos/PHPhotosErrorInvalid)

The requested operation is invalid.

[`var PHPhotosErrorLibraryVolumeOffline: Int`](/documentation/Photos/PHPhotosErrorLibraryVolumeOffline)

The photo library is unavailable because the file system volume that stores it isn’t mounted.

[`var PHPhotosErrorRelinquishingLibraryBundleToWriter: Int`](/documentation/Photos/PHPhotosErrorRelinquishingLibraryBundleToWriter)

The photo library is unavailable because the user moved, renamed, or deleted the system photo library.

[`var PHPhotosErrorSwitchingSystemPhotoLibrary: Int`](/documentation/Photos/PHPhotosErrorSwitchingSystemPhotoLibrary)

The photo library is unavailable because the user switched the system photo library.

[`var PHPhotosErrorUserCancelled: Int`](/documentation/Photos/PHPhotosErrorUserCancelled)

The user canceled the asset retrieval or editing request.



---

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)