<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHPhotosError-swift.struct/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:@E@PHPhotosError"
  },
  "title" : "PHPhotosError.Code"
}
-->

# PHPhotosError.Code

Error codes for framework operations.

```
enum Code
```

## Topics

### Error Codes

[`PHPhotosError.Code.accessRestricted`](/documentation/Photos/PHPhotosError-swift.struct/Code/accessRestricted)

An error that indicates the system configuration restricts access to the asset.

[`PHPhotosError.Code.accessUserDenied`](/documentation/Photos/PHPhotosError-swift.struct/Code/accessUserDenied)

An error that indicates the user denies access.

[`PHPhotosError.Code.changeNotSupported`](/documentation/Photos/PHPhotosError-swift.struct/Code/changeNotSupported)

An error that indicates the system doesn’t support the change request configuration.

[`PHPhotosError.Code.identifierNotFound`](/documentation/Photos/PHPhotosError-swift.struct/Code/identifierNotFound)

An error that indicates an identifier doesn’t exist.

[`PHPhotosError.Code.internalError`](/documentation/Photos/PHPhotosError-swift.struct/Code/internalError)

An error that indicates an internal error occurs.

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

An error that indicates the operation isn’t valid.

[`PHPhotosError.Code.invalidResource`](/documentation/Photos/PHPhotosError-swift.struct/Code/invalidResource)

An error that indicates the asset resource validation fails.

[`PHPhotosError.Code.libraryVolumeOffline`](/documentation/Photos/PHPhotosError-swift.struct/Code/libraryVolumeOffline)

An error that indicates the photo library isn’t available because the file system volume that stores it isn’t mounted.

[`PHPhotosError.Code.libraryInFileProviderSyncRoot`](/documentation/Photos/PHPhotosError-swift.struct/Code/libraryInFileProviderSyncRoot)

An error that indicates the Photos library bundle is in a file provider sync directory, and the framework doesn’t support it.

[`PHPhotosError.Code.limitExceeded`](/documentation/Photos/PHPhotosError-swift.struct/Code/limitExceeded)

An error that indicates the request exceeds a limit.

[`PHPhotosError.Code.missingResource`](/documentation/Photos/PHPhotosError-swift.struct/Code/missingResource)

An error that indicates a missing asset resource.

[`PHPhotosError.Code.multipleIdentifiersFound`](/documentation/Photos/PHPhotosError-swift.struct/Code/multipleIdentifiersFound)

An error that indicates that more than one identifier exists.

[`PHPhotosError.Code.networkAccessRequired`](/documentation/Photos/PHPhotosError-swift.struct/Code/networkAccessRequired)

An error that indicates the request for an asset resource fails because it requires network access.

[`PHPhotosError.Code.networkError`](/documentation/Photos/PHPhotosError-swift.struct/Code/networkError)

An error that indicates the request for an asset resource fails because of a network connection error.

[`PHPhotosError.Code.notEnoughSpace`](/documentation/Photos/PHPhotosError-swift.struct/Code/notEnoughSpace)

An error that indicates there’s not enough space to perform the requested change.

[`PHPhotosError.Code.operationInterrupted`](/documentation/Photos/PHPhotosError-swift.struct/Code/operationInterrupted)

An error that indicates an interruption occurs and the operation can’t complete.

[`PHPhotosError.Code.persistentChangeDetailsUnavailable`](/documentation/Photos/PHPhotosError-swift.struct/Code/persistentChangeDetailsUnavailable)

An error that indicates the change details aren’t available for the persistent change.

[`PHPhotosError.Code.persistentChangeTokenExpired`](/documentation/Photos/PHPhotosError-swift.struct/Code/persistentChangeTokenExpired)

An error that indicates the library state is older than the available history of persistent changes.

[`PHPhotosError.Code.relinquishingLibraryBundleToWriter`](/documentation/Photos/PHPhotosError-swift.struct/Code/relinquishingLibraryBundleToWriter)

An error that indicates the photo library isn’t available because the user moves, renames, or deletes the system’s photo library.

[`PHPhotosError.Code.requestNotSupportedForAsset`](/documentation/Photos/PHPhotosError-swift.struct/Code/requestNotSupportedForAsset)

An error that indicates the system doesn’t support the request for the specified asset.

[`PHPhotosError.Code.switchingSystemPhotoLibrary`](/documentation/Photos/PHPhotosError-swift.struct/Code/switchingSystemPhotoLibrary)

An error that indicates the photo library isn’t available because the user switches the system’s photo library.

[`PHPhotosError.Code.userCancelled`](/documentation/Photos/PHPhotosError-swift.struct/Code/userCancelled)

An error that indicates the user cancels the asset retrieval or editing request.

[`PHPhotosErrorInvalid`](/documentation/Photos/PHPhotosError-c.enum/PHPhotosErrorInvalid)

An error that indicates the operation isn’t valid.



---

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)