<!--
{
  "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/PHPhotoLibrary/unavailabilityReason",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHPhotoLibrary(py)unavailabilityReason"
  },
  "title" : "unavailabilityReason"
}
-->

# unavailabilityReason

An error that describes the reason the photo library isn’t available.

```
var unavailabilityReason: (any Error)? { get }
```

## Discussion

This property contains a valid error only when the library is unavailable.

---

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)